X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=5daec7f7984647093f339f18e0fda4a3a75dbb73;hb=18d0aad577ed779ee27cfd0552c4096c3346a577;hp=ad2d48e243097a04176fb06f733a02dee5980f9f;hpb=bf69a0b2bd314bab8144767cf16d67309180d84b;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index ad2d48e..5daec7f 100755 --- a/scripts/live +++ b/scripts/live @@ -325,9 +325,9 @@ Arguments () ;; skipunion) - SKIP_UNION_MOUNTS="Yes" - export SKIP_UNION_MOUNTS - ;; + SKIP_UNION_MOUNTS="Yes" + export SKIP_UNION_MOUNTS + ;; root=*) ROOT="${ARGUMENT#root=}" @@ -1267,9 +1267,16 @@ setup_unionfs () log_warning_msg "Unknown file system type on ${backdev} (${image}), assuming ${fstype}." fi - mkdir -p "${croot}/${imagename}" - log_begin_msg "Mounting \"${image}\" on \"${croot}${imagename}\" via \"${backdev}\"" - mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}" + if [ "${UNIONTYPE}" != "unionmount" ] + then + mpoint="${croot}/${imagename}" + rofsstring="${mpoint}=${roopt}:${rofsstring}" && rofslist="${mpoint} ${rofslist}" + else + mpoint="${rootmnt}" + fi + mkdir -p "${mpoint}" + log_begin_msg "Mounting \"${image}\" on \"${mpoint}\" via \"${backdev}\"" + mount -t "${fstype}" -o ro,noatime "${backdev}" "${mpoint}" || panic "Can not mount ${backdev} (${image}) on ${mpoint}" log_end_msg fi done @@ -1383,6 +1390,9 @@ setup_unionfs () cow_mountopt="rw,noatime,mode=755" fi + if [ "${UNIONTYPE}" != "unionmount" ] + then + if [ "${cow_fstype}" = "nfs" ] then log_begin_msg \ @@ -1393,6 +1403,7 @@ setup_unionfs () mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || \ panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on /cow" fi + fi rofscount=$(echo ${rofslist} |wc -w) @@ -1437,6 +1448,10 @@ setup_unionfs () pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true ;; + unionmount) + mount_full -t ${cow_fstype} -o noatime,union,${cow_mountopt} ${cowdevice} "${rootmnt}" || panic "${UNIONTYPE} ${cowdevice} on ${rootmnt} failed with option noatime,union,${cow_mountopt}" + ;; + *) mount -t ${UNIONTYPE} -o noatime,${noxino_opt}dirs=/cow=rw:${rofsstring} ${UNIONTYPE} "${rootmnt}" || panic "mount ${UNIONTYPE} on ${rootmnt} failed with option noatime,${noxino_opt}dirs=/cow=rw:${rofsstring}" ;;