diff options
author | Juan RP <xtraeme@gmail.com> | 2015-01-16 09:30:30 +0100 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2015-01-16 09:30:30 +0100 |
commit | b51217a9ca94684413361b230dfeb5a3737f31b8 (patch) | |
tree | a227ad354507de6d612e5a183cacf0cc8fa4d55e | |
parent | 6394a10a18da669b9054244293d19902de037892 (diff) | |
parent | 728381ff7216d534b1c2c7ba1a28056ffcbb9500 (diff) | |
download | runit-void-b51217a9ca94684413361b230dfeb5a3737f31b8.tar.gz runit-void-b51217a9ca94684413361b230dfeb5a3737f31b8.tar.xz runit-void-b51217a9ca94684413361b230dfeb5a3737f31b8.zip |
Merge pull request #13 from teh-jazzman/shutdown
Added /etc/rc.shutdown, called in runlevel 3
-rwxr-xr-x | 3 | 2 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | rc.shutdown | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/3 b/3 index 65df780..ea30b9c 100755 --- a/3 +++ b/3 @@ -16,6 +16,8 @@ msg "Waiting for services to stop...\n" sv force-stop /var/service/* sv exit /var/service/* +[ -x /etc/rc.shutdown ] && /etc/rc.shutdown + msg "Saving random seed...\n" dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 >/dev/null 2>&1 diff --git a/Makefile b/Makefile index bfb820c..3c7d560 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ install: install -m644 functions $(DESTDIR)/etc/runit install -m644 rc.conf ${DESTDIR}/etc install -m755 rc.local ${DESTDIR}/etc + install -m755 rc.shutdown ${DESTDIR}/etc install -d ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d install -m644 dracut/*.conf ${DESTDIR}/${PREFIX}/lib/dracut/dracut.conf.d ln -sf /run/runit/reboot ${DESTDIR}/etc/runit/ diff --git a/rc.shutdown b/rc.shutdown new file mode 100644 index 0000000..244b77d --- /dev/null +++ b/rc.shutdown @@ -0,0 +1,4 @@ +# Default rc.shutdown for void; add your custom commands here. +# +# This is run by runit in stage 3 after the services are stopped +# (see /etc/runit/3). |