[ptpd/el6] stupid bug fixes
jondkent
jondkent at fedoraproject.org
Tue Jun 17 19:36:57 UTC 2014
commit fa63f89dc066afee63f453848729f4f2606ee5a1
Author: Jon Kent <jon.kent at gmail.com>
Date: Tue Jun 17 20:34:10 2014 +0100
stupid bug fixes
ptpd2 | 104 +++++-----------------------------------------------------------
1 files changed, 9 insertions(+), 95 deletions(-)
---
diff --git a/ptpd2 b/ptpd2
index 4bc06c2..ef90fd6 100644
--- a/ptpd2
+++ b/ptpd2
@@ -1,95 +1,9 @@
-#!/bin/sh
-#
-# ptpd Precision Time Protocol daemon
-#
-# chkconfig: - 30 70
-# description: ptpd implements a sub ms time coordination of LAN connected computers \
-# implementing IEEE 1588
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-exec="/usr/bin/ptpd2"
-prog="ptpd2"
-
-if [ -e /etc/sysconfig/$prog ]; then
- . /etc/sysconfig/$prog
- PTPD_OPTIONS="--global:lock_file=$PTPD_PID_FILE --global:status_file=$PTPD_STATUS_FILE -c $PTPD_CONFIG_FILE $PTPD_EXTRA_OPTIONS"
-fi
-
-lockfile=/var/lock/subsys/$prog
-
-start() {
- [ -x $exec ] || exit 5
- echo -n $"Starting $prog: "
- daemon --user root $exec $PTPDARGS
- retval=$?
- echo
- [ $retval -eq 0 ] && touch $lockfile
- return $retval
-}
-
-stop() {
- echo -n $"Stopping $prog: "
- killproc $prog
- retval=$?
- echo
- [ $retval -eq 0 ] && rm -f $lockfile
- return $retval
-}
-
-restart() {
- stop
- start
-}
-
-reload() {
- restart
-}
-
-force_reload() {
- restart
-}
-
-rh_status() {
- # run checks to determine if the service is running or use generic status
- status $prog
-}
-
-rh_status_q() {
- rh_status >/dev/null 2>&1
-}
-
-
-case "$1" in
- start)
- rh_status_q && exit 0
- $1
- ;;
- stop)
- rh_status_q || exit 0
- $1
- ;;
- restart)
- $1
- ;;
- reload)
- rh_status_q || exit 7
- $1
- ;;
- force-reload)
- force_reload
- ;;
- status)
- rh_status
- ;;
- condrestart|try-restart)
- rh_status_q || exit 0
- restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
- exit 2
-esac
-exit $?
-
+# Config file location
+PTPD_CONFIG_FILE="/etc/ptpd2.conf"
+# Lock / PID file location
+PTPD_PID_FILE="/var/run/ptpd2.lock"
+# Status file location
+PTPD_STATUS_FILE="/var/log/ptpd2.status"
+
+# Any extra command-line options
+PTPD_EXTRA_OPTIONS=""
More information about the scm-commits
mailing list