diff options
| -rwxr-xr-x | lx-trainer-vm/dd-multi.sh | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lx-trainer-vm/dd-multi.sh b/lx-trainer-vm/dd-multi.sh index 50f8786..499260b 100755 --- a/lx-trainer-vm/dd-multi.sh +++ b/lx-trainer-vm/dd-multi.sh @@ -134,29 +134,15 @@ for dest in $DESTS; do echo 'LABEL=lxhome /home ext4 defaults 0 0' | \ tee -a ${TMP_ROOT}${dest}${ROOTPT}/etc/fstab > /dev/null - # copy layer tarballs to /home - for tarball in $LAYERS; do - destfile="${TMP_ROOT}${dest}${HOMEPT}/`basename $tarball`" - if [ -f $destfile ]; then - echo - echo "WARNING: OVERWRITING $destfile" 1>&2 - echo - sleep 1 - fi - cp $tarball $destfile - done - # remount home to /home umount ${TMP_ROOT}${dest}${HOMEPT} mount ${dest}${HOMEPT} ${TMP_ROOT}${dest}${ROOTPT}/home # unpack layers for tarball in $LAYERS; do - destfile=`basename $tarball` - echo "unpacking $destfile to ${dest}" - chroot ${TMP_ROOT}${dest}${ROOTPT} \ - tar -x -f /home/$destfile --numeric-owner -C / - rm ${TMP_ROOT}${dest}${ROOTPT}/home/$destfile + echo "unpacking $tarball to $dest" + tar -x -f $tarball --numeric-owner \ + -C ${TMP_ROOT}${dest}${ROOTPT} done # unmount partitions |
