From 728381ff7216d534b1c2c7ba1a28056ffcbb9500 Mon Sep 17 00:00:00 2001 From: Stefan Mühlinghaus Date: Thu, 15 Jan 2015 22:49:49 +0100 Subject: Added /etc/rc.shutdown, called in runlevel 3 --- 3 | 2 ++ Makefile | 1 + rc.shutdown | 4 ++++ 3 files changed, 7 insertions(+) create mode 100644 rc.shutdown 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). -- cgit 1.4.1