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:
parent
817245d4dd
commit
31926767de
@ -211,7 +211,6 @@ dos2unix contrib/ms2isc/*
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing -Wno-unused"
|
CFLAGS="$RPM_OPT_FLAGS -W -Wall -fno-strict-aliasing -Wno-unused"
|
||||||
CFLAGS=$(echo "$CFLAGS" | sed -e "s/-O./-O0/g")
|
|
||||||
%ifarch ppc ppc64 s390x
|
%ifarch ppc ppc64 s390x
|
||||||
# bugs 134590, 171532
|
# bugs 134590, 171532
|
||||||
CFLAGS="$CFLAGS -fsigned-char"
|
CFLAGS="$CFLAGS -fsigned-char"
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
# physical network segment to another.
|
# physical network segment to another.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
DHCPv_OPT=-4
|
||||||
DAEMON="ISC DHCPv4 relay agent"
|
DAEMON="ISC DHCPv4 relay agent"
|
||||||
DAEMON_BIN=/usr/sbin/dhcrelay
|
DAEMON_BIN=/usr/sbin/dhcrelay
|
||||||
DAEMON_CONF=/etc/sysconfig/dhcrelay
|
DAEMON_CONF=/etc/sysconfig/dhcrelay
|
||||||
@ -79,7 +80,9 @@ rc_reset
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $DAEMON"
|
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
|
## If interfaces or servers are not set, skip starting of dhcrelay
|
||||||
## and return with "program not configured"
|
## and return with "program not configured"
|
||||||
@ -100,8 +103,8 @@ case "$1" in
|
|||||||
# startproc should return 0, even if service is
|
# startproc should return 0, even if service is
|
||||||
# already running to match LSB spec.
|
# already running to match LSB spec.
|
||||||
test "$2" = "-v" && echo -en \
|
test "$2" = "-v" && echo -en \
|
||||||
"\nexecuting '$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 $DAEMON_BIN $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=$?
|
rc=$?
|
||||||
if ! [ $rc -eq 0 ]; then
|
if ! [ $rc -eq 0 ]; then
|
||||||
if [ $link = $base ] ; then
|
if [ $link = $base ] ; then
|
||||||
|
14
rc.dhcrelay6
14
rc.dhcrelay6
@ -25,7 +25,7 @@
|
|||||||
# physical network segment to another.
|
# physical network segment to another.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
DHCPv_OPT=-6
|
||||||
DAEMON="ISC DHCPv6 relay agent"
|
DAEMON="ISC DHCPv6 relay agent"
|
||||||
DAEMON_BIN=/usr/sbin/dhcrelay6
|
DAEMON_BIN=/usr/sbin/dhcrelay6
|
||||||
DAEMON_CONF=/etc/sysconfig/dhcrelay
|
DAEMON_CONF=/etc/sysconfig/dhcrelay
|
||||||
@ -80,14 +80,16 @@ rc_reset
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $DAEMON"
|
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
|
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"
|
DHCRELAY6_LOWER_INTERFACES_ARGS="$DHCRELAY6_LOWER_INTERFACES_ARGS -l $l"
|
||||||
done
|
done
|
||||||
for u in $DHCRELAY6_UPPER_INTERFACES ; do
|
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"
|
DHCRELAY6_UPPER_INTERFACES_ARGS="$DHCRELAY6_UPPER_INTERFACES_ARGS -u $u"
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -108,8 +110,8 @@ case "$1" in
|
|||||||
# startproc should return 0, even if service is
|
# startproc should return 0, even if service is
|
||||||
# already running to match LSB spec.
|
# already running to match LSB spec.
|
||||||
test "$2" = "-v" && echo -en \
|
test "$2" = "-v" && echo -en \
|
||||||
"\nexecuting '$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 $DAEMON_BIN $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=$?
|
rc=$?
|
||||||
if ! [ $rc -eq 0 ]; then
|
if ! [ $rc -eq 0 ]; then
|
||||||
if [ $link = $base ] ; then
|
if [ $link = $base ] ; then
|
||||||
|
@ -32,21 +32,21 @@ DHCRELAY_OPTIONS=""
|
|||||||
## Default: ""
|
## Default: ""
|
||||||
## ServiceRestart: dhcrelay6
|
## ServiceRestart: dhcrelay6
|
||||||
#
|
#
|
||||||
# Specifies the ``lower'' network interface for DHCPv6 relay mode
|
# Specifies the ``lower'' client link network interfaces for DHCPv6
|
||||||
# separated by spaces.
|
# relay -- separated by spaces.
|
||||||
# The format of the lower interface is: "[address%]ifname[#index]".
|
# The format of the lower interface is: "[address%]ifname[#index]".
|
||||||
#
|
#
|
||||||
DHCRELAY6_LOWER_INTERFACES_ARGS=""
|
DHCRELAY6_LOWER_INTERFACES=""
|
||||||
|
|
||||||
## Type: string
|
## Type: string
|
||||||
## Default: ""
|
## Default: ""
|
||||||
## ServiceRestart: dhcrelay6
|
## ServiceRestart: dhcrelay6
|
||||||
#
|
#
|
||||||
# Specifies the ``upper'' network interface for DHCPv6 relay mode
|
# Specifies the ``upper'' server link network interfaces for DHCPv6
|
||||||
# separated by spaces.
|
# relay -- separated by spaces.
|
||||||
# The format of the upper interface is "[address%]ifname".
|
# The format of the upper interface is "[address%]ifname".
|
||||||
#
|
#
|
||||||
DHCRELAY6_UPPER_INTERFACES_ARGS=""
|
DHCRELAY6_UPPER_INTERFACES=""
|
||||||
|
|
||||||
## Type: string
|
## Type: string
|
||||||
## Default: ""
|
## Default: ""
|
||||||
|
Loading…
Reference in New Issue
Block a user