aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-01-21 10:50:25 +0300
committerCem Keylan <cem@ckyln.com>2020-01-21 10:50:25 +0300
commit391be3c7b8459d74c102ce0059a3a4d0dbe4f188 (patch)
treec958cda6b1ff86f6d53bec33604e03909ad4115f
parentfc76321656bfa05da81011a670d750483390153e (diff)
downloadinit-391be3c7b8459d74c102ce0059a3a4d0dbe4f188.tar.gz
stop services after pre-shutdown hooks
-rwxr-xr-xrc.shutdown10
1 files changed, 5 insertions, 5 deletions
diff --git a/rc.shutdown b/rc.shutdown
index a9ca570..7caa853 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -5,17 +5,17 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
-out "Waiting for services to stop..."; {
- sv -w196 force-stop /var/service/*
- sv exit /var/service/*
-}
-
out "Running pre shutdown hooks..."
for file in /etc/init/*.pre.shutdown ; do
[ -f "$file" ] && \
out "Running $file" && . "$file"
done
+out "Waiting for services to stop..."; {
+ sv -w196 force-stop /var/service/*
+ sv exit /var/service/*
+}
+
out "Saving random seed..."; {
dd count=1 bs=512 if=/dev/random of=/var/random.seed
}