index : archiso32 | |
Archlinux32 iso tools | gitolite user |
summaryrefslogtreecommitdiff |
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-11-28 12:28:03 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-11-28 12:28:03 -0300 |
commit | 76dea1654eafdf6544899edcad839a7d22bcddce (patch) | |
tree | 3abe9ac330109be76756ffccf27e11c0fb6211c6 /archiso/hooks | |
parent | 8eb4c624dc41f47f93a04d9e42f531e0642e228b (diff) |
-rw-r--r-- | archiso/hooks/archiso_pxe_nfs | 26 |
diff --git a/archiso/hooks/archiso_pxe_nfs b/archiso/hooks/archiso_pxe_nfs new file mode 100644 index 0000000..a053672 --- /dev/null +++ b/archiso/hooks/archiso_pxe_nfs @@ -0,0 +1,26 @@ +# vim: set ft=sh: + +run_hook() { + if [[ -n "${ip}" && -n "${archiso_nfs_srv}" ]]; then + + archiso_nfs_srv=$(eval echo ${archiso_nfs_srv}) + [[ -n "${archiso_nfs_opt}" ]] && archiso_nfs_opt="-o ${archiso_nfs_opt}" + + mount_handler="archiso_nfs_mount_handler" + fi +} + +archiso_nfs_mount_handler() { + newroot="${1}" + mkdir -p "/run/archiso/bootmnt" + msg ":: Mounting '${archiso_nfs_srv}'" + # Do not put "${archiso_nfs_opt}" nfsmount fails! + if ! nfsmount ${archiso_nfs_opt} "${archiso_nfs_srv}" "/run/archiso/bootmnt"; then + echo "ERROR: Mounting '${archiso_nfs_srv}'" + echo " Falling back to interactive prompt" + echo " You can try to fix the problem manually, log out when you are finished" + launch_interactive_shell + fi + + archiso_mount_handler ${newroot} +} |