summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x32
-rw-r--r--Makefile1
-rw-r--r--rc.shutdown4
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).