blob: b9fc37319a03c6d34d6b5838627444fbb7508550 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#!/bin/sh
while [ $# -gt 0 ] ; do
case $1 in
-start_servers)
start_servers=$1
;;
esac
shift
done
# If it's set, set it to true
VERBOSE=${VERBOSE_TEST:+true}
# Otherwise, set it to false
DUMMY=${VERBOSE:=false}
# files="/etc/inetd.conf /etc/syslog.conf /etc/krb.conf \
# /etc/krb.realms /etc/passwd /etc/services /etc/v5srvtab \
# /etc/rc.local /etc/shadow /etc/security/passwd /.k5login \
# /.secure/etc/passwd /etc/athena/inetd.conf"
files="/etc/krb.conf /etc/krb.realms /etc/athena/krb.conf \
/etc/athena/krb.realms /etc/v5srvtab"
name=`basename $0`
make_dne_name()
{
dne_name="/tmp/"`echo $1 | sed -e 's,/,#,g'`".did-not-exist"
}
for f in $files ; do
if [ "$name" = "save_files.sh" ]; then
if [ -f $f.pre-secure ]; then
if $VERBOSE; then
echo "Warning! $f.pre-secure exists, not saving."
fi
elif [ ! -f $f ]; then
make_dne_name $f
cp /dev/null $dne_name
else
cp $f $f.pre-secure
fi
else
make_dne_name $f
if [ -f $dne_name ]; then
rm -f $f $dne_name
elif [ ! -f $f.pre-secure ]; then
if [ "x$start_servers" = "x" ]; then
echo "Warning! $f.pre-secure does not exist!" 1>&2
fi
else
if cp $f.pre-secure $f; then
rm $f.pre-secure
else
echo "Warning! cp failed!" 1>&2
fi
fi
fi
done
# DUMMY=${INETD:=/etc/inetd}
# if $VERBOSE; then
# echo "Killing and restarting $INETD"
# fi
# kill `$PS_ALL | awk '/inetd/ && !/awk/ {print $2}'`
# $INETD
|