diff options
author | Harald Hoyer <harald@redhat.com> | 2013-03-20 10:22:41 +0100 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-03-20 10:22:41 +0100 |
commit | 5bfa3b363a35fb5586f015701832eab5544385bf (patch) | |
tree | d490d6fb212a616ffe1b9fc64f4897c731500800 /dracut.sh | |
parent | 1d4b3375431d2d19d511aa5784f2c1ed1e6bbb9e (diff) | |
download | dracut-5bfa3b363a35fb5586f015701832eab5544385bf.tar.gz dracut-5bfa3b363a35fb5586f015701832eab5544385bf.tar.bz2 dracut-5bfa3b363a35fb5586f015701832eab5544385bf.zip |
dracut.sh: turn off host-only mode, if essential system filesystems not mounted
Diffstat (limited to 'dracut.sh')
-rwxr-xr-x | dracut.sh | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -781,6 +781,15 @@ fi # Need to be able to have non-root users read stuff (rpcbind etc) chmod 755 "$initdir" +if [[ $hostonly ]]; then + for i in /sys /proc /run /dev; do + if ! findmnt "$i" &>/dev/null; then + dwarning "Turning off host-only mode: '$i' is not mounted!" + unset hostonly + fi + done +fi + declare -A host_fs_types for line in "${fstab_lines[@]}"; do |