From ac895893badb7a5169990100e0799e3484b58bcd Mon Sep 17 00:00:00 2001 From: Thomas Lotterer Date: Thu, 7 Aug 2003 08:50:53 +0000 Subject: [PATCH] use rcService for checking enable, usable and active only; fix PR#232 --- ntp/ntp.spec | 2 +- ntp/rc.ntp | 10 +++++----- rsync/rc.rsync | 8 ++++---- rsync/rsync.spec | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ntp/ntp.spec b/ntp/ntp.spec index 5ccfbc5799..f15e7e0970 100644 --- a/ntp/ntp.spec +++ b/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 diff --git a/ntp/rc.ntp b/ntp/rc.ntp index d09f9ec892..daebfebc1e 100644 --- a/ntp/rc.ntp +++ b/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 diff --git a/rsync/rc.rsync b/rsync/rc.rsync index 6c9f5c4c94..a205e9f79e 100644 --- a/rsync/rc.rsync +++ b/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 \ diff --git a/rsync/rsync.spec b/rsync/rsync.spec index 3ff8c60ae0..f5f9823c53 100644 --- a/rsync/rsync.spec +++ b/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