Vorbereitung auf upstart

git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_ntp@5573 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2010-04-22 13:35:17 +00:00
parent 39c60757d4
commit 86f5b18fd7
2 changed files with 36 additions and 15 deletions

19
etc/init/ntpd.conf Normal file
View File

@ -0,0 +1,19 @@
description "Samba Name Deamon"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on (runlevel [2345] and (started ifup))
stop on runlevel [016]
console output
pre-start script
if [ -f /etc/ntp.conf ]; then
/usr/bin/ntpdate `grep server /etc/ntp.conf|head --lines=1|sed -e "s/server //g"`
else
exit 10
fi
end script
exec /usr/bin/ntpd -n -l /var/log/ntp.log

View File

@ -32,6 +32,7 @@
#
#
if [ -d /var/install/sysvinit* ]; then
WDIR=`pwd`
cd etc/init.d
chmod 755 ntp
@ -47,3 +48,4 @@ for i in 3 4 5; do
cd ..
done
cd $WDIR
fi