Move root option processing into a pre-mount hook.
This will make it easier to add support for root on nfs, root on iscsi, root on multipath, and other such oddities.master
parent
5cad5bb50e
commit
76c88488c4
|
|
@ -3,6 +3,7 @@ dracut_install mount mknod mkdir modprobe pidof sleep chroot echo sed sh ls
|
|||
# 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"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
[ "$root" ] && mount $fstype -o "$rflags" "$root" "$NEWROOT" && \
|
||||
ROOTFS_MOUNTED=yes
|
||||
|
|
@ -22,6 +22,3 @@
|
|||
[ "$fstype" ] || {
|
||||
fstype="$(getarg rootfstype=)" && fstype="-t ${fstype}"
|
||||
}
|
||||
|
||||
[ -e "$root" ] && mount $fstype -o "$rflags" "$root" "$NEWROOT" && \
|
||||
ROOTFS_MOUNTED=yes
|
||||
Loading…
Reference in New Issue