mountroot ()
{
- if [ -x /scripts/local-top/cryptroot ]; then
- /scripts/local-top/cryptroot
+ if [ -x /scripts/local-top/cryptroot ]
+ then
+ /scripts/local-top/cryptroot
fi
exec 6>&1
fi
- if [ -n "${ROOT_PID}" ] ; then
+ if [ -n "${ROOT_PID}" ]
+ then
echo "${ROOT_PID}" > "${rootmnt}"/live/root.pid
fi
# unionfs-fuse needs /dev to be bind-mounted for the duration of
# live-bottom; udev's init script will take care of things after that
- if [ "${UNIONTYPE}" = unionfs-fuse ]
- then
- mount -n -o bind /dev "${rootmnt}/dev"
- fi
+ case "${UNIONTYPE}" in
+ unionfs-fuse)
+ mount -n -o bind /dev "${rootmnt}/dev"
+ ;;
+ esac
# Move to the new root filesystem so that programs there can get at it.
if [ ! -d /root/live/image ]
fi
fi
- # copy snapshot configuration if exists
- if [ -f snapshot.conf ]
- then
- log_begin_msg "Copying snapshot.conf to ${rootmnt}/etc/live/boot.d"
- if [ ! -d "${rootmnt}/etc/live/boot.d" ]
- then
- mkdir -p "${rootmnt}/etc/live/boot.d"
- fi
- cp snapshot.conf "${rootmnt}/etc/live/boot.d/"
- log_end_msg
- fi
-
if [ -f /etc/resolv.conf ] && [ ! -s ${rootmnt}/etc/resolv.conf ]
then
log_begin_msg "Copying /etc/resolv.conf to ${rootmnt}/etc/resolv.conf"
panic "A wrong rootfs was mounted."
fi
- persistence_exclude
- fstab
+ Fstab
Netbase
case "${LIVE_SWAPON}" in
;;
esac
- if [ "${UNIONFS}" = unionfs-fuse ]
- then
- umount "${rootmnt}/dev"
- fi
+ case "${UNIONFS}" in
+ unionfs-fuse)
+ umount "${rootmnt}/dev"
+ ;;
+ esac
exec 1>&6 6>&-
exec 2>&7 7>&-
kill ${tailpid}
- [ -w "${rootmnt}/var/log/" ] && mkdir -p /var/log/live && cp boot.log "${rootmnt}/var/log/live" 2>/dev/null
+ [ -w "${rootmnt}/var/log/" ] && mkdir -p "${rootmnt}/var/log/live" && cp boot.log "${rootmnt}/var/log/live" 2>/dev/null
}