SHA256
1
0
forked from pool/dhcp

Applied init script & sysconfig variable fixes

cleaned up debug build hooks

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=44
This commit is contained in:
Marius Tomaschewski 2010-11-29 14:55:05 +00:00 committed by Git OBS Bridge
parent 817245d4dd
commit 31926767de
4 changed files with 20 additions and 16 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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: ""