Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller
openntpd
ntpd.init
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ntpd.init of Package openntpd
#! /bin/sh # Copyright (c) 1995-2003 SuSE Linux AG, Nuernberg, Germany. # All rights reserved. # # Author: Dirk Mueller # based on script by Michael Andres # # /etc/init.d/ntpd # and its symbolic link # /usr/sbin/rcntpd # ### BEGIN INIT INFO # Provides: ntp ntpd xntpd # Required-Start: $remote_fs $syslog $named # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: Start network time protocol daemon (NTPD). ### END INIT INFO # First reset status of this service . /etc/rc.status rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - insufficient privilege # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # set default options NTP_CONF="/etc/ntpd.conf" if [ ! -f ${NTP_CONF} ]; then echo -n "Time server configuration file, ${NTP_CONF} does not exist." # Tell the user this has skipped rc_status -s exit 6 fi NTPD_BIN="/usr/sbin/ntpd" if [ ! -x ${NTPD_BIN} ]; then echo -n "Time server, ${NTPD_BIN} not installed!" rc_status -s exit 5 fi NTPD_PID="/var/run/ntpd.pid" function ntpd_is_running() { $0 status >/dev/null } case "$1" in start) echo -n "Starting network time protocol daemon (NTPD)" startproc $NTPD_BIN rc_status -v ;; stop) echo -n "Shutting down network time protocol daemon (NTPD)" killproc -TERM $NTPD_BIN rc_status -v rm -f ${NTPD_PID} ;; try-restart) $0 status if test $? = 0; then $0 restart else rc_reset # Not running is not a failure. fi # Remember status and be quiet rc_status ;; restart) $0 stop $0 start rc_status ;; force-reload) # Does not support signalling to reload $0 try-restart rc_status ;; reload) echo -n "Reload network time protocol daemon (NTPD)" # Does not support signalling to reload rc_failed 3 rc_status -v ;; status) echo -n "Checking for network time protocol daemon (NTPD): " checkproc -p ${NTPD_PID} $NTPD_BIN rc_status -v ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|restart-iburst|force-reload|reload}" exit 1 ;; esac rc_exit
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor