Browse Source

Previous runtime and logging problems are unreproducible so promote to EVAL, and implement features in ticket #202

master
Michael Schloh von Bennewitz 22 years ago committed by Ralf S. Engelschall
parent
commit
e3bed869a1
  1. 30
      arpd/arpd.spec
  2. 6
      arpd/rc.arpd

30
arpd/arpd.spec

@ -23,22 +23,17 @@
## SUCH DAMAGE.
##
# FIXME: On FreeBSD arpd is not starting (broken kevent used by libevent)
# FIXME: Log is not written
# FIXME: MSvB: Logging problem is possibly fixed by recent fsl additions
# FIXME: mlelstv: junk because of too many problems
# package information
Name: arpd
Summary: Address Resolution Protocol (ARP) Reply Daemon
URL: http://www.citi.umich.edu/u/provos/honeyd/
Vendor: Niels Provos, Dug Song
Packager: The OpenPKG Project
Distribution: OpenPKG [JUNK]
Distribution: OpenPKG [EVAL]
Group: Network
License: GNU
Version: 0.2
Release: 20030722
Release: 20030924
# package options
%option with_fsl yes
@ -128,3 +123,24 @@ AutoReqProv: no
%clean
rm -rf $RPM_BUILD_ROOT
%pre
# before upgrade, save status and stop service
[ $1 -eq 2 ] || exit 0
eval `%{l_rc} arpd status 2>/dev/null | tee %{l_tmpfile}`
%{l_rc} arpd stop 2>/dev/null
exit 0
%post
if [ $1 -eq 2 ]; then
# after upgrade, restore status
eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}
[ ".$arpd_active" = .yes ] && %{l_rc} arpd start
fi
exit 0
%preun
# before erase, stop service and remove log files
[ $1 -eq 0 ] || exit 0
%{l_rc} arpd stop 2>/dev/null
exit 0

6
arpd/rc.arpd

@ -30,6 +30,7 @@
%start -u @l_susr@
rcService arpd enable yes || exit 0
rcService arpd active yes && exit 0
opts=""
if [ ".$arpd_interface" != . ]; then
opts="$opts -i $arpd_interface"
@ -41,16 +42,19 @@
%stop -u @l_susr@
rcService arpd enable yes || exit 0
rcService arpd active no && exit 0
arpd_signal TERM
%restart -u @l_susr@
rcService arpd enable yes || exit 0
rcService arpd active no && exit 0
rc arpd start
sleep 2
rc arpd stop
%reload -u @l_susr@
rcService arpd enable yes || exit 0
rcService arpd active no && exit 0
arpd_signal HUP
%daily -u @l_susr@
@ -61,6 +65,6 @@
-n ${arpd_log_numfiles} -s ${arpd_log_minsize} -d \
-z ${arpd_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
-P "${arpd_log_prolog}" \
-E "${arpd_log_epilog}" \
-E "${arpd_log_epilog} && rc arpd restart" \
@l_prefix@/var/arpd/arpd.log

Loading…
Cancel
Save