summary refs log tree commit diff
path: root/etc
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2001-12-30 16:34:28 +0000
committerGerrit Pape <pape@smarden.org>2001-12-30 16:34:28 +0000
commit6094955e365886e5005d9f559b031e9e79ad674d (patch)
treee3c9cf399b8f63d9d0fd761761bceda9e95a53f4 /etc
parent2ff91a26d1ba9d7d374c8216dbbf0d12465f500a (diff)
downloadrunit-6094955e365886e5005d9f559b031e9e79ad674d.tar.gz
runit-6094955e365886e5005d9f559b031e9e79ad674d.tar.xz
runit-6094955e365886e5005d9f559b031e9e79ad674d.zip
0.2.6.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/openbsd/17
-rwxr-xr-xetc/openbsd/22
-rwxr-xr-xetc/openbsd/324
-rwxr-xr-xetc/openbsd/ctrlaltdel8
-rwxr-xr-xetc/openbsd/getty-ttyC4/run2
5 files changed, 43 insertions, 0 deletions
diff --git a/etc/openbsd/1 b/etc/openbsd/1
new file mode 100755
index 0000000..06681e4
--- /dev/null
+++ b/etc/openbsd/1
@@ -0,0 +1,7 @@
+#!/bin/sh
+# system one time tasks
+rm -f /etc/runit/stopit
+
+/bin/sh /etc/rc autoboot
+
+exit 0
diff --git a/etc/openbsd/2 b/etc/openbsd/2
new file mode 100755
index 0000000..9966e42
--- /dev/null
+++ b/etc/openbsd/2
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /command/svscanboot
diff --git a/etc/openbsd/3 b/etc/openbsd/3
new file mode 100755
index 0000000..c382337
--- /dev/null
+++ b/etc/openbsd/3
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+echo 'Stopping getties...'
+/command/svc -d /service/getty-*
+/command/svwaitdown -t14 /service/getty-* || \
+  ( echo 'Killing getties...' ; /command/svc -k /service/getty-* )
+
+echo 'Stopping services...'
+/command/svc -d /service/*
+/command/svwaitdown -t350 /service/* || \
+  ( echo 'Killing services...' ; /command/svc -k /service/* )
+
+echo 'Stopping log services...'
+/command/svc -d /service/*/log
+/command/svwaitdown -t35 /service/*/log
+
+echo 'Shutdown...'
+if test -r /etc/runit/reboot; then
+  /sbin/reboot
+else
+  /sbin/halt
+fi
+
+exit 0
diff --git a/etc/openbsd/ctrlaltdel b/etc/openbsd/ctrlaltdel
new file mode 100755
index 0000000..aa62a01
--- /dev/null
+++ b/etc/openbsd/ctrlaltdel
@@ -0,0 +1,8 @@
+#!/bin/sh
+MSG="System is going down in 14 seconds..."
+
+echo 'disabled.' ; exit
+
+/bin/touch /etc/runit/stopit && \
+  /bin/echo "$MSG" | /usr/bin/wall
+/bin/sleep 14
diff --git a/etc/openbsd/getty-ttyC4/run b/etc/openbsd/getty-ttyC4/run
new file mode 100755
index 0000000..c1d9cb9
--- /dev/null
+++ b/etc/openbsd/getty-ttyC4/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/libexec/getty Pc ttyC4