are present. It should exit with a 0 if they are, and a 1 if they are
not.
- When called with -h, it should perform the same check that it would
+ When called with -H, it should perform the same check that it would
without any options, and it should also check to see if the
functionality the module implements is being used on the host system.
For example, if this module handles installing support for LUKS
Any other files in the module will not be touched by dracut directly.
-You are encouraged to provide a README that descrobes what the module is for.
\ No newline at end of file
+You are encouraged to provide a README that descrobes what the module is for.
export dracutfunctions
# this logic is weird and convoluted. We should simplify it.
+# seriously, wtf?
case $dracutmodules in
""|auto)
dracutmodules="all"
;;
hostonly)
dracutmodules="all"
- hostonly="-h"
+ hostonly="-H"
;;
esac
#!/bin/sh
[ "$1" = "-d" ] && echo network
-[ "$1" = "-h" ] && ! egrep -q '/ nfs[34 ]' /proc/mounts && exit 1
+[ "$1" = "-H" ] || [ "$1" = "--hostonly" ] && ! egrep -q '/ nfs[34 ]' /proc/mounts && exit 1
which rpcbind rpc.statd mount.nfs mount.nfs4 umount >/dev/null 2>&1 || exit 1
exit 0
which cryptsetup >/dev/null 2>&1 || exit 1
-if [ "$1" = "-h" ]; then
+if [ "$1" = "-H" ] || [ "$1" = "--hostonly" ]; then
blkid | grep -q crypt_LUKS || exit 1
fi
#!/bin/sh
which dmraid >/dev/null 2>&1 || exit 1
-if [ "$1" = "-h" ]; then
+if [ "$1" = "-H" ] || [ "$1" = "--hostonly" ]; then
dmraid -r | grep -q ok || exit 1
fi
-exit 0
\ No newline at end of file
+exit 0
#!/bin/sh
-[ "$1" != "-h" ] && exit 1
+[ "$1" = "-H" ] || [ "$1" = "--hostonly" ] && exit 1
#!/bin/sh
which lvm >/dev/null 2>&1 || exit 1
-if [ "$1" = "-h" ]; then
+if [ "$1" = "-H" ] || [ "$1" = "--hostonly" ]; then
blkid | grep -q lvm2pv || exit 1
fi
#!/bin/sh
which mdadm >/dev/null 2>&1 || exit 1
-if [ "$1" = "-h" ]; then
+if [ "$1" = "-H" ] || [ "$1" = "--hostonly" ]; then
blkid | grep -q linux_raid || exit 1
fi