summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rw-r--r--hooks/net14
1 files changed, 14 insertions, 0 deletions
diff --git a/hooks/net b/hooks/net
index ff33955..d2085c7 100644
--- a/hooks/net
+++ b/hooks/net
@@ -80,6 +80,20 @@ run_hook ()
rootfstype="nfs"
echo "NFS-Mount: ${nfs_server}:${nfs_path}"
+
+ # set mount handler for NFS
+ mount_handler="nfs_mount_handler"
fi
fi
}
+
+nfs_mount_handler() {
+ if [ -z "$nfs_server" -o -z "$nfs_path" ]; then
+ err "Unable to mount root filesystem over NFS: wrong parameters."
+ echo "You are being dropped to a recovery shell"
+ echo " Type 'exit' to try and continue booting"
+ launch_interactive_shell
+ msg "Trying to continue (this will most likely fail) ..."
+ fi
+ nfsmount ${nfs_option:+-o ${nfs_option}} "${nfs_server}:${nfs_path}" "$1"
+}