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 Group: Network
License: BSD-style License: BSD-style
Version: 4.1.2 Version: 4.1.2
Release: 20030723 Release: 20030807
# package options # package options
%option with_fsl yes %option with_fsl yes

10
ntp/rc.ntp

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

8
rsync/rc.rsync

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

2
rsync/rsync.spec

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

Loading…
Cancel
Save