Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion installer/x86_64/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ if [ "$install_env" != "sonic" ]; then
}
else
demo_mnt="/host"
TAR_EXTRA_OPTION="--numeric-owner"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to confine this option only to the SONiC-to-SONiC upgrade installation? I believe it should be safe for the ONIE install, as well. In fact, it's probably safer to use it on all installs. I can test an ONIE install using it just to confirm.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onie is using another version of tar which does not support this option, but it works so it must using uid/gid by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ONIE versions installed on our dev devices are using BusyBox tar v1.20.2 which supports the option, however it is not listed in the help menu. See https://github.com/mozilla-b2g/busybox/blob/master/archival/tar.c#L796

running_sonic_revision=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ")
# Prevent installing existing SONiC if it is running
if [ "$image_dir" = "image-$running_sonic_revision" ]; then
Expand Down Expand Up @@ -417,7 +418,7 @@ fi
unzip $ONIE_INSTALLER_PAYLOAD -d $demo_mnt/$image_dir

if [ -f $demo_mnt/$image_dir/$FILESYSTEM_DOCKERFS ]; then
cd $demo_mnt/$image_dir && mkdir -p $DOCKERFS_DIR && tar xf $FILESYSTEM_DOCKERFS -C $DOCKERFS_DIR && rm -f $FILESYSTEM_DOCKERFS; cd $OLDPWD
cd $demo_mnt/$image_dir && mkdir -p $DOCKERFS_DIR && tar x $TAR_EXTRA_OPTION -f $FILESYSTEM_DOCKERFS -C $DOCKERFS_DIR && rm -f $FILESYSTEM_DOCKERFS; cd $OLDPWD
fi

# Create loop device for /var/log to limit its size to $VAR_LOG_SIZE MB
Expand Down