diff options
author | Eric Hameleers <alien@slackware.com> | 2023-09-17 21:54:00 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2023-09-17 21:54:00 +0200 |
commit | 631e9429e188fb76f9d6b89ed79abd1e1f6b803c (patch) | |
tree | 17e6bf0c6779f7518bbe5ba90c571bdb64fdbfa5 /liveinit.tpl | |
parent | 71a40884419fa30f2a8b2ac898b55fdc719eae80 (diff) | |
download | liveslak-631e9429e188fb76f9d6b89ed79abd1e1f6b803c.tar.gz liveslak-631e9429e188fb76f9d6b89ed79abd1e1f6b803c.tar.xz |
liveinit: fix shutdown/reboot for PXE clients
This needed some changes because the Slackware rc.0 and rc.6 scripts have
evolved and my old hacks no longer worked.
Diffstat (limited to '')
-rw-r--r-- | liveinit.tpl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/liveinit.tpl b/liveinit.tpl index 8f0a957..e00d984 100644 --- a/liveinit.tpl +++ b/liveinit.tpl @@ -1820,11 +1820,14 @@ EOT # 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)/' + for RUNLVL in 0 6 ; do + sed -i /mnt/overlay/etc/rc.d/rc.${RUNLVL} \ + -e "/on \/ type nfs/s%grep -q 'on / type nfs'%egrep -q 'on / type (nfs|tmpfs)'%" \ + -e "s%'on / type nfs4'%& -e 'on / type overlay'%" \ + -e '/umount.*nfs/s/nfs,//' \ + -e 's/rc.udev force-stop/rc.udev stop/' \ + -e 's/$(pgrep mdmon)/& $(pgrep udevd)/' + done fi # Copy contents of rootcopy directory (may be empty) to overlay: |