Browse Source

consistently name interface variables xxx_if and display a hint on initial installation that those packages need this variable to be set before it can be started (although usually all OpenPKG daemon packages can be started without any configurations)

master
parent
commit
71d7ebfe25
  1. 9
      arpd/arpd.spec
  2. 6
      arpd/rc.arpd
  3. 10
      dhcpd/dhcpd.spec
  4. 9
      honeyd/honeyd.spec
  5. 6
      honeyd/rc.honeyd
  6. 8
      snort/snort.spec

9
arpd/arpd.spec

@ -33,7 +33,7 @@ Class: EVAL
Group: Network
License: GNU
Version: 0.2
Release: 20050302
Release: 20050729
# package options
%option with_fsl yes
@ -138,6 +138,13 @@ AutoReqProv: no
exit 0
%post
if [ $1 -eq 1 ]; then
# display final hints on initial installation
( echo "Before starting ARP daemon, please set the configuration variable"
echo "\"arpd_if\" in $RPM_INSTALL_PREFIX/etc/rc.conf to the name of the"
echo "used network interface."
) | %{l_rpmtool} msg -b -t notice
fi
if [ $1 -eq 2 ]; then
# after upgrade, restore status
eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}

6
arpd/rc.arpd

@ -11,7 +11,7 @@
arpd_log_minsize="1M"
arpd_log_complevel="9"
arpd_ip_network="192.168.100.0/24"
arpd_hw_iface=""
arpd_if=""
%common
arpd_pidfile="@l_prefix@/var/arpd/arpd.pid"
@ -31,8 +31,8 @@
%start -u @l_susr@
rcService arpd enable yes || exit 0
rcService arpd active yes && exit 0
if [ ".$arpd_hw_iface" != . ]; then
arpd_interface="-i $arpd_hw_iface"
if [ ".$arpd_if" != . ]; then
arpd_interface="-i $arpd_if"
fi
@l_prefix@/sbin/arpd \
$arpd_interface \

10
dhcpd/dhcpd.spec

@ -33,7 +33,7 @@ Class: BASE
Group: DNS
License: ISC/BSD
Version: 3.0.3
Release: 20050726
Release: 20050729
# package options
%option with_fsl yes
@ -159,6 +159,14 @@ AutoReqProv: no
rm -rf $RPM_BUILD_ROOT
%post
if [ $1 -eq 1 ]; then
# display final hints on initial installation
( echo "Before starting DHCP daemon, please set the configuration variable"
echo "\"dhcpd_if\" in $RPM_INSTALL_PREFIX/etc/rc.conf to the name of the"
echo "used network interface."
) | %{l_rpmtool} msg -b -t notice
fi
# after upgrade, restart service
[ $1 -eq 2 ] || exit 0
eval `%{l_rc} dhcpd status 2>/dev/null`

9
honeyd/honeyd.spec

@ -33,7 +33,7 @@ Class: EVAL
Group: Security
License: BSD
Version: 1.0
Release: 20050107
Release: 20050729
# package options
%option with_fsl yes
@ -217,6 +217,13 @@ AutoReqProv: no
exit 0
%post
if [ $1 -eq 1 ]; then
# display final hints on initial installation
( echo "Before starting Honey daemon, please set the configuration variable"
echo "\"honeyd_if\" in $RPM_INSTALL_PREFIX/etc/rc.conf to the name of the"
echo "used network interface."
) | %{l_rpmtool} msg -b -t notice
fi
if [ $1 -eq 2 ]; then
# after upgrade, restore status
eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}

6
honeyd/rc.honeyd

@ -11,7 +11,7 @@
honeyd_log_minsize="1M"
honeyd_log_complevel="9"
honeyd_ip_network="192.168.100.0/24"
honeyd_hw_iface=""
honeyd_if=""
%common
honeyd_pidfile="@l_prefix@/var/honeyd/honeyd.pid"
@ -37,8 +37,8 @@
%start -u @l_susr@
rcService honeyd enable yes || exit 0
rcService honeyd active yes && exit 0
if [ ".$honeyd_hw_iface" != . ]; then
arpd_interface="-i $honeyd_hw_iface"
if [ ".$honeyd_if" != . ]; then
arpd_interface="-i $honeyd_if"
fi
@l_prefix@/bin/honeyd \
-p $honeyd_prnfile \

8
snort/snort.spec

@ -203,6 +203,14 @@ AutoReqProv: no
rm -rf $RPM_BUILD_ROOT
%post
if [ $1 -eq 1 ]; then
# display final hints on initial installation
( echo "Before starting Snort IDS, please set the configuration variable"
echo "\"snort_if\" in $RPM_INSTALL_PREFIX/etc/rc.conf to the name of the"
echo "used network interface."
) | %{l_rpmtool} msg -b -t notice
fi
# after upgrade, restart service
[ $1 -eq 2 ] || exit 0
eval `%{l_rc} snort status 2>/dev/null`

Loading…
Cancel
Save