Browse Source

use rcService for checking enable, usable and active only; fix PR#232

master
Thomas Lotterer 23 years ago committed by Ralf S. Engelschall
parent
commit
ac895893ba
  1. 2
      ntp/ntp.spec
  2. 10
      ntp/rc.ntp
  3. 8
      rsync/rc.rsync
  4. 2
      rsync/rsync.spec

2
ntp/ntp.spec

@ -33,7 +33,7 @@ Distribution: OpenPKG [CORE]
Group: Network
License: BSD-style
Version: 4.1.2
Release: 20030723
Release: 20030807
# package options
%option with_fsl yes

10
ntp/rc.ntp

@ -37,14 +37,14 @@
# on startup, force synchronize local machine
# because ntpd does not skip large time offsets
# the "active" short circuit above does not hurt
if rcService ntp ostart yes; then
if rcVarIsYes ntp_ostart; then
@l_prefix@/bin/ntpdate \
`grep "^server" @l_prefix@/etc/ntp/ntp.conf |\
awk '{ printf(" %s", $2); }'`
fi
# run the NTP daemon for continued synchronization
if rcService ntp daemon yes; then
if rcVarIsYes ntp_daemon; then
@l_prefix@/bin/ntpd \
-p @l_prefix@/var/ntp/ntpd.pid \
-f @l_prefix@/var/ntp/ntpd.drift \
@ -54,19 +54,19 @@
%stop -u @l_susr@
rcService ntp enable yes || exit 0
rcService ntp active no && exit 0
rcService ntp daemon yes || exit 0
rcVarIsYes ntp_daemon || exit 0
ntp_signal TERM
rm -f $ntp_pidfile 2>/dev/null || true
%restart -p 200 -u @l_susr@
rcService ntp enable yes || exit 0
rcService ntp active no && exit 0
rcService ntp daemon yes || exit 0
rcVarIsYes ntp_daemon || exit 0
rc ntp stop start
%hourly -u @l_susr@
rcService ntp enable yes || exit 0
rcService ntp hourly yes || exit 0
rcVarIsYes ntp_hourly || exit 0
# synchronize local machine every hour
# because ntpd does not skip large time offsets

8
rsync/rc.rsync

@ -36,7 +36,7 @@
%start -u @l_susr@
rcService rsync enable yes || exit 0
rcService rsync active yes && exit 0
rcService rsync daemon yes || exit 0
rcVarIsYes rsync_daemon || exit 0
flags="$rsync_flags"
echo $flags | grep -- --address >/dev/null
if [ $? -ne 0 -a ".$rsync_bind" != . ]; then
@ -53,19 +53,19 @@
%stop -u @l_susr@
rcService rsync enable yes || exit 0
rcService rsync active no && exit 0
rcService rsync daemon yes || exit 0
rcVarIsYes rsync_daemon || exit 0
rsync_signal TERM
sleep 2
%restart -u @l_susr@
rcService rsync enable yes || exit 0
rcService rsync active no && exit 0
rcService rsync daemon yes || exit 0
rcVarIsYes rsync_daemon || exit 0
rc rsync stop start
%daily -u @l_susr@
rcService rsync enable yes || exit 0
rcService rsync daemon yes || exit 0
rcVarIsYes rsync_daemon || exit 0
# rotate logfile
shtool rotate -f \

2
rsync/rsync.spec

@ -33,7 +33,7 @@ Distribution: OpenPKG [CORE]
Group: Filesystem
License: GPL
Version: 2.5.6
Release: 20030729
Release: 20030807
# list of sources
Source0: http://rsync.samba.org/ftp/rsync/rsync-%{version}.tar.gz

Loading…
Cancel
Save