Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37562270
en ru br
ALT Linux repositórios
S:4.2.8p15-alt4
5.0: 4.2.4-alt4.p6.1
4.1: 4.2.4-alt3.p4.M41.2
4.0: 4.2.2-alt1.p4.3
3.0: 4.1.2-alt3
+backports:4.2.4-alt0.M30.3.p4

Group :: Sistema/Configurações/Rede
RPM: ntp

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh
#
# ntpd This shell script takes care of starting and stopping
# ntpd (NTPv4 daemon).
#
# chkconfig: 35 55 10
# description: ntpd is the NTPv4 daemon.

WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

# Source service configuration.
SourceIfNotEmpty /etc/sysconfig/ntpd

NTPDATE=/usr/sbin/ntpdate
NTPD=/usr/sbin/ntpd
LOCKFILE=/var/lock/subsys/ntpd
RETVAL=0

start()
{
is_yes "$NETWORKING" || return 0

# Adjust time to make life easy for ntpd.
if grep -qvs '^#' /etc/ntp/step-tickers; then
action $"Synchronizing with time server:" \
"$NTPDATE" -s -b -p 8 $NTPDATE_OPTIONS -u "`/bin/sed -e 's/#.*//' /etc/ntp/step-tickers`"
fi

start_daemon --lockfile "$LOCKFILE" --expect-user ntpd -- ntpd $NTPD_OPTIONS
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --lockfile "$LOCKFILE" --expect-user ntpd -- ntpd
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --expect-user ntpd -- ntpd
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac

exit $RETVAL
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009