Skip to content

Commit

Permalink
[Aboot]: Add '--numeric-owner' when untarring docker filesystem to pr…
Browse files Browse the repository at this point in the history
…eserve original owners (#653)
  • Loading branch information
jleveque authored and lguohan committed Jun 1, 2017
1 parent a5c0dff commit b0c9933
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion files/Aboot/boot0.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ extract_image() {
if [ -n "$sonic_upgrade" ] || [ "$rootfs_type" != "vfat" ]; then
mkdir -p "$image_path/{{ DOCKERFS_DIR }}"

if [ -n "$sonic_upgrade" ]; then
TAR_EXTRA_OPTION="--numeric-owner"
fi

## extract docker archive
tar xf "$image_path/{{ FILESYSTEM_DOCKERFS }}" -C "$image_path/{{ DOCKERFS_DIR }}"
tar xf "$image_path/{{ FILESYSTEM_DOCKERFS }}" -C "$image_path/{{ DOCKERFS_DIR }}" $TAR_EXTRA_OPTION

## clean up docker archive
rm -f "$image_path/{{ FILESYSTEM_DOCKERFS }}"
Expand Down

0 comments on commit b0c9933

Please sign in to comment.