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
#
# install,v 3.1 1993/07/06 01:10:53 jbj Exp
#
# install,v
# Revision 3.1 1993/07/06 01:10:53 jbj
# XNTP release 3.1
#
#
# Revision 1.1 1992/12/10 12:59:21 kardel
# Prerelease NTP V3 / DCF
#
# Revision 1.1 1992/06/18 14:50:08 kardel
# Initial revision
#
#
NTPROOT=/local/NTP # SITE SPECIFIC: where NTP resides
#
# where the local NTP state files reside (xntp.drift) ussualle /etc
# this directory must not be shared as machine dependent data ist stored there
#
NTPDIR="/+private/local/NTP"
#
# get the initial setup
#
if [ ! -r $NTPROOT/etc/setup ]; then
echo "ERROR: $NTPROOT/etc/setup missing - incorrect installation."
exit 1
else
. $NTPROOT/etc/setup
fi
umask 022 # SITE SPECIFIC: local policy - watch out for NFS and "root" rights
Mkdir() {
p=""
IFS="/"
set -- $@
IFS='
'
for pnc do
if [ ! -d "$p/$pnc" ]; then
ECHO -n "creating directory $p/$pnc"
if mkdir "$p/$pnc"; then
ECHO ""
else
ECHO " - FAILED"
break;
fi
fi
p="$p/$pnc"
done
}
if [ ! -d "$NTPDIR" ]; then
ECHO "installing NTP private data area ($NTPDIR)"
if Mkdir "$NTPDIR"; then
chmod 755 "$NTPDIR"
ECHO "$NTPDIR created."
fi
else
ECHO "NTP already installed."
if [ -f "$NTPDIR/xntp.drift" ]; then
ECHO "currently saved drift value:" `cat "$NTPDIR/xntp.drift"`
fi
fi
|