~morty/fai/trunk

« back to all changes in this revision

Viewing changes to scripts/faireboot

  • Committer: Thomas Lange
  • Date: 2005-11-10 12:47:47 UTC
  • Revision ID: git-v1:cf3cbb08a817ca4214ba8686e237d2ea61fdf30d
rename directory scripts to bin, fix pathes in Makefile

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/bash
2
 
 
3
 
# $Id$
4
 
# reboot FAI correctly, Thomas Lange, Uni Koeln, copyright 2000-2004
5
 
 
6
 
faimond=0
7
 
. /usr/lib/fai/subroutines
8
 
. /usr/lib/fai/subroutines-`uname -s | tr /A-Z/ /a-z/`
9
 
 
10
 
[ -f /tmp/fai/variables.sh ] && . /tmp/fai/variables.sh
11
 
 
12
 
while getopts s opt ; do
13
 
        case "$opt" in
14
 
        s) fai-savelog -r ;;
15
 
        esac
16
 
done
17
 
 
18
 
cd /
19
 
killall -STOP rcS
20
 
killall -q apt-get dpkg tar gzip yes cat syslogd 
21
 
 
22
 
[ "X" == "X$SSH_CLIENT" -a  "$TERM" != "dumb" ] && killall -q sshd
23
 
 
24
 
fai-divert -R
25
 
 
26
 
umount $FAI_ROOT/proc $FAI_ROOT/dev/pts
27
 
umount -ar
28
 
 
29
 
sndmon "FAIREBOOT"
30
 
echo "$HOSTNAME now rebooting"
31
 
 
32
 
if [ "X" == "X$SSH_CLIENT" -a  "$TERM" != "dumb" ]; then
33
 
    exec reboot -dfi
34
 
else
35
 
    killall -CONT rcS
36
 
    killall rcS
37
 
    init 6 &
38
 
fi