diff --git a/dhcp.spec b/dhcp.spec index ca411f4..a9d84c7 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -211,7 +211,6 @@ dos2unix contrib/ms2isc/* %build CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing -Wno-unused" -CFLAGS=$(echo "$CFLAGS" | sed -e "s/-O./-O0/g") %ifarch ppc ppc64 s390x # bugs 134590, 171532 CFLAGS="$CFLAGS -fsigned-char" diff --git a/rc.dhcrelay b/rc.dhcrelay index 2ceef2a..40ee2e2 100644 --- a/rc.dhcrelay +++ b/rc.dhcrelay @@ -25,6 +25,7 @@ # physical network segment to another. ### END INIT INFO +DHCPv_OPT=-4 DAEMON="ISC DHCPv4 relay agent" DAEMON_BIN=/usr/sbin/dhcrelay DAEMON_CONF=/etc/sysconfig/dhcrelay @@ -79,7 +80,9 @@ rc_reset case "$1" in start) echo -n "Starting $DAEMON" - checkproc $DAEMON_BIN && { echo -n "... already running"; rc_status -v; exit 0; } + checkproc -p $DAEMON_PIDFILE $DAEMON_BIN && { + echo -n "... already running"; rc_status -v; exit 0; + } ## If interfaces or servers are not set, skip starting of dhcrelay ## and return with "program not configured" @@ -100,8 +103,8 @@ case "$1" in # startproc should return 0, even if service is # already running to match LSB spec. test "$2" = "-v" && echo -en \ - "\nexecuting '$DAEMON_BIN $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS'" - startproc -q -l $STARTPROC_LOGFILE $DAEMON_BIN $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS + "\nexecuting '$DAEMON_BIN $DHCPv_OPT $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS'" + startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS rc=$? if ! [ $rc -eq 0 ]; then if [ $link = $base ] ; then diff --git a/rc.dhcrelay6 b/rc.dhcrelay6 index 8bd273d..15b137b 100644 --- a/rc.dhcrelay6 +++ b/rc.dhcrelay6 @@ -25,7 +25,7 @@ # physical network segment to another. ### END INIT INFO - +DHCPv_OPT=-6 DAEMON="ISC DHCPv6 relay agent" DAEMON_BIN=/usr/sbin/dhcrelay6 DAEMON_CONF=/etc/sysconfig/dhcrelay @@ -80,14 +80,16 @@ rc_reset case "$1" in start) echo -n "Starting $DAEMON" - checkproc $DAEMON_BIN && { echo -n "... already running"; rc_status -v; exit 0; } + checkproc -p $DAEMON_PIDFILE $DAEMON_BIN && { + echo -n "... already running"; rc_status -v; exit 0; + } for l in $DHCRELAY6_LOWER_INTERFACES ; do - test x"$l" = x && continue + test "x$l" = x -o "x$l" = "x-l" && continue DHCRELAY6_LOWER_INTERFACES_ARGS="$DHCRELAY6_LOWER_INTERFACES_ARGS -l $l" done for u in $DHCRELAY6_UPPER_INTERFACES ; do - test x"$u" = x && continue + test "x$u" = x -o "x$u" = "x-u" && continue DHCRELAY6_UPPER_INTERFACES_ARGS="$DHCRELAY6_UPPER_INTERFACES_ARGS -u $u" done @@ -108,8 +110,8 @@ case "$1" in # startproc should return 0, even if service is # already running to match LSB spec. test "$2" = "-v" && echo -en \ - "\nexecuting '$DAEMON_BIN $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS'" - startproc -q -l $STARTPROC_LOGFILE $DAEMON_BIN $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS + "\nexecuting '$DAEMON_BIN $DHCPv_OPT $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS'" + startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS rc=$? if ! [ $rc -eq 0 ]; then if [ $link = $base ] ; then diff --git a/sysconfig.dhcrelay b/sysconfig.dhcrelay index c51c45c..3d6ee67 100644 --- a/sysconfig.dhcrelay +++ b/sysconfig.dhcrelay @@ -32,21 +32,21 @@ DHCRELAY_OPTIONS="" ## Default: "" ## ServiceRestart: dhcrelay6 # -# Specifies the ``lower'' network interface for DHCPv6 relay mode -# separated by spaces. +# Specifies the ``lower'' client link network interfaces for DHCPv6 +# relay -- separated by spaces. # The format of the lower interface is: "[address%]ifname[#index]". # -DHCRELAY6_LOWER_INTERFACES_ARGS="" +DHCRELAY6_LOWER_INTERFACES="" ## Type: string ## Default: "" ## ServiceRestart: dhcrelay6 # -# Specifies the ``upper'' network interface for DHCPv6 relay mode -# separated by spaces. +# Specifies the ``upper'' server link network interfaces for DHCPv6 +# relay -- separated by spaces. # The format of the upper interface is "[address%]ifname". # -DHCRELAY6_UPPER_INTERFACES_ARGS="" +DHCRELAY6_UPPER_INTERFACES="" ## Type: string ## Default: ""