--- /dev/null
+#!/bin/sh
+#
+# Take the system down for backups and then bring it back up.
+
+set -e
+cd /etc/backup
+
+host="`hostname`" || true
+
+T () {
+ (
+ exec wall <<END &
+ *** WARNING - SYSTEM GOING DOWN FOR BACKUPS ***
+ $host will shut down automatically $2.
+
+END
+ ) &
+ sleep $1
+}
+
+. "warnings.$1"
+
+(
+ exec wall <<END &
+ *** WARNING - SYSTEM GOING DOWN FOR BACKUPS ***
+
+ $host is shutting down IMMEDIATELY.
+
+END
+) &
+sleep 1
+
+telinit 5