aboutsummaryrefslogtreecommitdiff
path: root/contrib/ntp/scripts/rc1
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>1999-12-09 13:01:21 +0000
committerOllivier Robert <roberto@FreeBSD.org>1999-12-09 13:01:21 +0000
commitc0b746e5e8d9479f05b3749cbf1f73b8928719bd (patch)
treefc0cfa1aab0ff6b228f511b410733ef4f35d1ead /contrib/ntp/scripts/rc1
Virgin import of ntpd 4.0.98fvendor/ntp/4.0.98f
Diffstat (limited to 'contrib/ntp/scripts/rc1')
-rw-r--r--contrib/ntp/scripts/rc1/postinstall2
-rw-r--r--contrib/ntp/scripts/rc1/preinstall6
-rw-r--r--contrib/ntp/scripts/rc1/preremove4
-rw-r--r--contrib/ntp/scripts/rc1/prototype19
-rw-r--r--contrib/ntp/scripts/rc1/xntp29
5 files changed, 60 insertions, 0 deletions
diff --git a/contrib/ntp/scripts/rc1/postinstall b/contrib/ntp/scripts/rc1/postinstall
new file mode 100644
index 000000000000..d84b8c517211
--- /dev/null
+++ b/contrib/ntp/scripts/rc1/postinstall
@@ -0,0 +1,2 @@
+#!/bin/sh
+/etc/init.d/xntp start
diff --git a/contrib/ntp/scripts/rc1/preinstall b/contrib/ntp/scripts/rc1/preinstall
new file mode 100644
index 000000000000..aa18639c2fe6
--- /dev/null
+++ b/contrib/ntp/scripts/rc1/preinstall
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ -x /etc/init.d/xntp ]
+then
+ /etc/init.d/xntp stop
+fi
+exit 0
diff --git a/contrib/ntp/scripts/rc1/preremove b/contrib/ntp/scripts/rc1/preremove
new file mode 100644
index 000000000000..b870151a27b4
--- /dev/null
+++ b/contrib/ntp/scripts/rc1/preremove
@@ -0,0 +1,4 @@
+#!/bin/sh
+/etc/init.d/xntp stop
+
+exit 0
diff --git a/contrib/ntp/scripts/rc1/prototype b/contrib/ntp/scripts/rc1/prototype
new file mode 100644
index 000000000000..3de20b076b8c
--- /dev/null
+++ b/contrib/ntp/scripts/rc1/prototype
@@ -0,0 +1,19 @@
+!default 755 root bin
+i pkginfo
+i preinstall
+i postinstall
+i preremove
+f none /etc/init.d/xntp=xntp 0755 root other
+l none /etc/rc2.d/S79xntp=/etc/init.d/xntp
+l none /etc/rc1.d/K79xntp=/etc/init.d/xntp
+l none /etc/rc0.d/K79xntp=/etc/init.d/xntp
+f none /usr/sbin/xntpd=xntpd/xntpd 0555 root other
+f none /usr/sbin/xntpdc=xntpdc/xntpdc 0555 root other
+f none /usr/sbin/ntpq=ntpq/ntpq 0555 root other
+f none /usr/sbin/ntptrace=ntptrace/ntptrace 0555 root other
+f none /usr/sbin/ntpdate=ntpdate/ntpdate 0555 root other
+f none /usr/share/man/man1m/xntpd.1m=doc/xntpd.8 0444 root other
+f none /usr/share/man/man1m/xntpdc.1m=doc/xntpdc.8 0444 root other
+f none /usr/share/man/man1m/ntpdate.1m=doc/ntpdate.8 0444 root other
+f none /usr/share/man/man1m/ntpq.1m=doc/ntpq.8 0444 root other
+f none /usr/share/man/man1m/ntptrace.1m=doc/ntptrace.8 0444 root other
diff --git a/contrib/ntp/scripts/rc1/xntp b/contrib/ntp/scripts/rc1/xntp
new file mode 100644
index 000000000000..227b943aaa2e
--- /dev/null
+++ b/contrib/ntp/scripts/rc1/xntp
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+killproc() { # kill named processes
+ pid=`/usr/bin/ps -e |
+ /usr/bin/grep $1 |
+ /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ [ "$pid" != "" ] && kill $pid
+}
+
+case "$1" in
+'start')
+ ps -e | grep xntpd > /dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ echo "ntp daemon already running. ntp start aborted"
+ exit 0
+ fi
+ if [ -f /etc/inet/ntp.conf -a -x /usr/sbin/xntpd ]
+ then
+ /usr/sbin/xntpd -c /etc/inet/ntp.conf
+ fi
+ ;;
+'stop')
+ killproc xntpd
+ ;;
+*)
+ echo "Usage: /etc/init.d/xntp { start | stop }"
+ ;;
+esac