summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xliveinit10
1 files changed, 10 insertions, 0 deletions
diff --git a/liveinit b/liveinit
index 2a58fd4..e9a4485 100755
--- a/liveinit
+++ b/liveinit
@@ -990,6 +990,16 @@ EOT
# Delete ALSA state file, the Live OS may be booted on different computers:
rm -f /mnt/overlay/var/lib/alsa/asound.state
+ # In case of network boot, do not kill the network, umount NFS prematurely
+ # or stop udevd on shutdown:
+ if [ -n "$NFSHOST" ]; then
+ sed -i /mnt/overlay/etc/rc.d/rc.0 \
+ -e "/on \/ type nfs/s%grep -q 'on / type nfs'%egrep -q 'on / type (nfs|tmpfs)'%" \
+ -e '/umount.*nfs/s/nfs,//' \
+ -e 's/rc.udev force-stop/rc.udev stop/' \
+ -e 's/$(pgrep mdmon)/& $(pgrep udevd)/'
+ fi
+
# Copy contents of rootcopy directory (may be empty) to overlay:
cp -af /mnt/media/${LIVEMAIN}/rootcopy/* /mnt/overlay/ 2>/dev/null