summaryrefslogtreecommitdiff
path: root/lx-trainer-vm
diff options
context:
space:
mode:
Diffstat (limited to 'lx-trainer-vm')
-rwxr-xr-xlx-trainer-vm/dd-multi.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/lx-trainer-vm/dd-multi.sh b/lx-trainer-vm/dd-multi.sh
index dc205a6..e68e16a 100755
--- a/lx-trainer-vm/dd-multi.sh
+++ b/lx-trainer-vm/dd-multi.sh
@@ -134,9 +134,11 @@ for dest in $DESTS; do
mount ${dest}${ROOTPT} ${TMP_ROOT}${dest}${ROOTPT}
mount ${dest}${HOMEPT} ${TMP_ROOT}${dest}${HOMEPT}
- # move home directories to home partition
- echo "moving /home/* to ${dest}${HOMEPT}"
- mv ${TMP_ROOT}${dest}${ROOTPT}/home/* ${TMP_ROOT}${dest}${HOMEPT}/
+ # move home directories (if any) to home partition
+ if [ -n "`ls ${TMP_ROOT}${dest}${ROOTPT}/home`" ]; then
+ echo "moving /home/* to ${dest}${HOMEPT}"
+ mv ${TMP_ROOT}${dest}${ROOTPT}/home/* ${TMP_ROOT}${dest}${HOMEPT}/
+ fi
# setup home partition to be mounted as /home
echo 'LABEL=lxhome /home ext4 defaults 0 0' | \