3 # Entry point for cron to take the system down for backups
5 # This file is part of chiark backup, a system for backing up GNU/Linux and
6 # other UN*X-compatible machines, as used on chiark.greenend.org.uk.
9 # Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
10 # Copyright (C) 1999 Peter Maydell <pmaydell@chiark.greenend.org.uk>
12 # This is free software; you can redistribute it and/or modify it under the
13 # terms of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2, or (at your option) any later version.
16 # This is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 # You should have received a copy of the GNU General Public License along
22 # with this program; if not, write to the Free Software Foundation, Inc.,
23 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 # Expects a single (possibly empty) argument X which is used to select
26 # a file /etc/chiark-backup/warnings.X. This file will contain lines like:
27 # T 300 "in 10 minutes"
28 # T 240 "in 5 minutes"
30 # T 15 "in 15 seconds"
31 # configuring the frequency of warning messages. If you call the
32 # files 'warnings.soon', 'warnings.now' and 'warnings.' then
33 # you can invoke this as:
34 # takedown lots of warnings
35 # takedown soon not so many warnings
36 # takedown now no warning at all
41 host="`hostname`" || true
46 *** WARNING - SYSTEM GOING DOWN FOR BACKUPS ***
47 $host will shut down automatically $2.
58 *** WARNING - SYSTEM GOING DOWN FOR BACKUPS ***
60 $host is shutting down IMMEDIATELY.
66 # We assume that runlevel 5 is set up suitably for doing backups
67 # (ie non-essential services turned off in an effort to get the