diff --git a/openssh/openssh.spec b/openssh/openssh.spec index 4fc3fb90cf..2785e7eec7 100644 --- a/openssh/openssh.spec +++ b/openssh/openssh.spec @@ -38,7 +38,7 @@ Distribution: OpenPKG [CORE] Group: Security License: BSD Version: %{V_base}%{V_portable} -Release: 20030715 +Release: 20030717 # package options %option with_fsl yes @@ -63,8 +63,8 @@ Source9: http://chrootssh.sourceforge.net/download/osshChroot-%{V_chroot}.d # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20030710, perl -PreReq: OpenPKG, openpkg >= 20030710 +BuildPreReq: OpenPKG, openpkg >= 20030716, perl +PreReq: OpenPKG, openpkg >= 20030716 BuildPreReq: openssl, zlib PreReq: openssl, zlib %if "%{with_pam}" == "yes" diff --git a/openssh/rc.openssh b/openssh/rc.openssh index f70554a747..405bbe0d34 100644 --- a/openssh/rc.openssh +++ b/openssh/rc.openssh @@ -13,11 +13,19 @@ %common openssh_signal () { - if [ -f "@l_prefix@/var/openssh/sshd.pid" ]; then - kill -$1 `cat @l_prefix@/var/openssh/sshd.pid` - fi + openssh_pidfile="@l_prefix@/var/openssh/sshd.pid" + [ -f $openssh_pidfile ] && kill -$1 `cat $openssh_pidfile` } +%status -p 200 -u @l_susr@ -o + openssh_usable="unknown" + openssh_active="no" + opServiceEnabled openssh && \ + openssh_signal 0 && openssh_active="yes" + echo "openssh_enable=\"$openssh_enable\"" + echo "openssh_usable=\"$openssh_usable\"" + echo "openssh_active=\"$openssh_active\"" + %start -p 200 -u @l_susr@ opServiceEnabled openssh || exit 0 @l_prefix@/bin/sshd @@ -25,6 +33,8 @@ %stop -p 200 -u @l_susr@ opServiceEnabled openssh || exit 0 openssh_signal TERM + # sshd removes the pidfile itself + # rm -f $openssh_pidfile 2>/dev/null || true %restart -u @l_susr@ opServiceEnabled openssh || exit 0 diff --git a/rsync/rc.rsync b/rsync/rc.rsync index e63fb0fe8a..6037fdab78 100644 --- a/rsync/rc.rsync +++ b/rsync/rc.rsync @@ -15,6 +15,18 @@ rsync_cfgfile="@l_prefix@/etc/rsync/rsync.conf" rsync_logfile="@l_prefix@/var/rsync/rsync.log" rsync_pidfile="@l_prefix@/var/rsync/rsync.pid" + rsync_signal () { + [ -f $rsync_pidfile ] && kill -$1 `cat $rsync_pidfile` + } + +%status -p 200 -u @l_susr@ -o + rsync_usable="unknown" + rsync_active="no" + opServiceEnabled rsync && \ + rsync_signal 0 && rsync_active="yes" + echo "rsync_enable=\"$rsync_enable\"" + echo "rsync_usable=\"$rsync_usable\"" + echo "rsync_active=\"$rsync_active\"" %start -p 200 -u @l_susr@ opServiceEnabled rsync || exit 0 @@ -23,16 +35,14 @@ %stop -p 200 -u @l_susr@ opServiceEnabled rsync || exit 0 - if [ -f $rsync_pidfile ]; then - kill -TERM `cat $rsync_pidfile` - fi + rsync_signal TERM + # rsync removes the pidfile itself + # rm -f $rsync_pidfile 2>/dev/null || true %restart -u @l_susr@ opServiceEnabled rsync || exit 0 - if [ -f $rsync_pidfile ]; then - kill -TERM `cat $rsync_pidfile` - sleep 2 - fi + rsync_signal TERM + sleep 2 nice -n $rsync_nicelevel @l_prefix@/bin/rsync $rsync_flags \ --daemon --config=$rsync_cfgfile diff --git a/rsync/rsync.spec b/rsync/rsync.spec index df4e549c6f..e9d1ffc643 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: 20030710 +Release: 20030717 # list of sources Source0: http://rsync.samba.org/ftp/rsync/rsync-%{version}.tar.gz @@ -44,8 +44,8 @@ Patch0: rsync.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20030710 -PreReq: OpenPKG, openpkg >= 20030710 +BuildPreReq: OpenPKG, openpkg >= 20030716 +PreReq: OpenPKG, openpkg >= 20030716 AutoReq: no AutoReqProv: no