#!/bin/sh
#
# Take the system down for backups and then bring it back up.
+# Expects a single (possibly empty) argument X which is used to select
+# a file /etc/backup/warnings.X. This file will contain lines like:
+# T 300 "in 10 minutes"
+# T 240 "in 5 minutes"
+# T 45 "in 1 minute"
+# T 15 "in 15 seconds"
+# configuring the frequency of warning messages. If you call the
+# files 'warnings.soon', 'warnings.now' and 'warnings.' then
+# you can invoke this as:
+# takedown lots of warnings
+# takedown soon not so many warnings
+# takedown now no warning at all
set -e
cd /etc/backup
) &
sleep 1
+# We assume that runlevel 5 is set up suitably for doing backups
+# (ie non-essential services turned off in an effort to get the
+# tape to stream.)
telinit 5