Skip to content

Commit

Permalink
[image]: expand dockerfs.tar.gz directly on to disk without intermedi…
Browse files Browse the repository at this point in the history
…ate file (#715)
  • Loading branch information
lguohan authored Jun 18, 2017
1 parent 897cc2b commit 2f231f3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions installer/x86_64/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,11 @@ else
fi
# Decompress the file for the file system directly to the partition
unzip $ONIE_INSTALLER_PAYLOAD -d $demo_mnt/$image_dir
unzip -o $ONIE_INSTALLER_PAYLOAD -x "$FILESYSTEM_DOCKERFS" -d $demo_mnt/$image_dir
if [ -f $demo_mnt/$image_dir/$FILESYSTEM_DOCKERFS ]; then
TAR_EXTRA_OPTION="--numeric-owner"
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
TAR_EXTRA_OPTION="--numeric-owner"
mkdir -p $demo_mnt/$image_dir/$DOCKERFS_DIR
unzip -op $ONIE_INSTALLER_PAYLOAD "$FILESYSTEM_DOCKERFS" | tar xz $TAR_EXTRA_OPTION -f - -C $demo_mnt/$image_dir/$DOCKERFS_DIR
# Create loop device for /var/log to limit its size to $VAR_LOG_SIZE MB
if [ -f $demo_mnt/disk-img/var-log.ext4 ]; then
Expand Down

0 comments on commit 2f231f3

Please sign in to comment.