diff options
author | Eric Hameleers <alien@slackware.com> | 2016-05-28 22:31:01 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2016-05-28 22:31:01 +0200 |
commit | edb6ea93090b10f025551d75c6f53e0389c9348f (patch) | |
tree | 733719e37e8dd2157f14503b616088d55fab96df /liveinit | |
parent | 017eaba887b33f431e161934a282321f76909d14 (diff) | |
download | liveslak-edb6ea93090b10f025551d75c6f53e0389c9348f.tar.gz liveslak-edb6ea93090b10f025551d75c6f53e0389c9348f.tar.xz |
Ensure that a PXE-booted Slackware Live will shutdown properly.
In case of network boot, do not kill the network, umount NFS prematurely
or stop udevd on shutdown.
Diffstat (limited to 'liveinit')
-rwxr-xr-x | liveinit | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |