This will make it easier to add support for root on nfs, root on iscsi,
root on multipath, and other such oddities.
# install our scripts and hooks
inst "$moddir/init" "/init"
inst "$moddir/switch_root" "/sbin/switch_root"
+inst_hook pre-mount 10 "$moddir/parse-root-opts.sh"
inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh"
inst_hook mount 90 "$moddir/resume.sh"
-inst_hook mount 99 "$moddir/mount-partition.sh"
+inst_hook mount 99 "$moddir/mount-root.sh"
--- /dev/null
+#!/bin/sh
+[ "$root" ] && mount $fstype -o "$rflags" "$root" "$NEWROOT" && \
+ ROOTFS_MOUNTED=yes
[ "$fstype" ] || {
fstype="$(getarg rootfstype=)" && fstype="-t ${fstype}"
}
-
-[ -e "$root" ] && mount $fstype -o "$rflags" "$root" "$NEWROOT" && \
- ROOTFS_MOUNTED=yes