summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/rc.init12
-rwxr-xr-xexamples/rc.shutdown30
-rwxr-xr-xexamples/rc.tini16
3 files changed, 15 insertions, 43 deletions
diff --git a/examples/rc.init b/examples/rc.init
index d71fd1a..afc7735 100755
--- a/examples/rc.init
+++ b/examples/rc.init
@@ -1,17 +1,9 @@
#!/bin/execlineb -P
-
-# Make sure the /dev/urandom entropy pool will be set in
-# a not-too-distant future. Ideally we'd block on this,
-# but it's not critical, so we don't.
-
-background -d { s6-fillurandompool }
-
-
# Set the system clock to something sensible,
-# to get coherent logs until the initial NTP message
+# to get coherent logs until the initial NTP exchange
-if { s6-clock @40000000596c000000000000 }
+if { s6-clock @400000005a58000000000000 }
# Initialize the service manager
diff --git a/examples/rc.shutdown b/examples/rc.shutdown
index 04d7357..14b4692 100755
--- a/examples/rc.shutdown
+++ b/examples/rc.shutdown
@@ -1,20 +1,16 @@
-#!/bin/execlineb -S0
+#!/bin/execlineb -P
-foreground { s6-echo "Giving dying processes some grace time." }
-foreground { s6-sleep 2 }
-foreground { s6-echo "Syncing disks." }
-foreground { s6-sync }
-foreground { s6-echo "Sending all processes the TERM signal." }
-foreground { s6-nuke -th }
-foreground { s6-sleep 2 }
-foreground { s6-echo "Sending all processes the KILL signal." }
-foreground { s6-nuke -k }
-wait { }
-foreground { s6-echo "Syncing and unmounting disks." }
-foreground { s6-sync }
-foreground { s6-umount -a }
-foreground { s6-mount -ro remount /dev/root / }
+# Write a message to /var/log/syslogd
-foreground { s6-echo "\nPerforming "${1}"." }
-s6-${1} -f
+foreground
+{
+ s6-ipcclient -l0 /dev/log
+ fdmove 1 7
+ s6-echo "/etc/rc.shutdown: shutdown requested"
+}
+
+
+# Shut down all services
+
+s6-rc -da change
diff --git a/examples/rc.tini b/examples/rc.tini
deleted file mode 100755
index 02e7ec7..0000000
--- a/examples/rc.tini
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/execlineb -P
-
-
-# Write a message to /var/log/syslogd
-
-foreground
-{
- s6-ipcclient -l0 /dev/log
- fdmove 1 7
- s6-echo "/etc/rc.tini: shutdown requested"
-}
-
-
-# Shut down all services
-
-s6-rc -da change