# configtest itself
configtest() {
local rc=0
- /sbin/dhcpd -4 -q -t -T || rc=$?
+ /sbin/dhcpd -4 -t -T || rc=$?
# check if interfaces specified exist and have addresses
for i in $DHCPD_INTERFACES; do
local details=${1:-0}
# run checkconfig only once
- if [ "$checkconfig" != -1 ]; then
+ if [ $checkconfig -ne -1 ]; then
return $checkconfig
fi
- if [ $details = 1 ]; then
+ if [ "$details" = "1" ]; then
# run config test and display report (status action)
show "Checking %s configuration" "DHCP Server"; busy
local out
out=$(configtest 2>&1)
checkconfig=$?
- if [ $checkconfig = 0 ]; then
+ if [ $checkconfig -eq 0 ]; then
ok
else
fail
# (for actions checking status before action).
configtest >/dev/null 2>&1
checkconfig=$?
- if [ $checkconfig != 0 ]; then
+ if [ $checkconfig -ne 0 ]; then
show "Checking %s configuration" "DHCP Server"; fail
nls 'Configuration test failed. See details with %s "checkconfig"' $0
exit $checkconfig
# configtest itself
configtest() {
local rc=0
- /sbin/dhcpd -6 -pf -cf /etc/dhcpd6.conf /var/run/dhpcd6.pid -q -t -T || rc=$?
+ /sbin/dhcpd -6 -t -T -cf /etc/dhcpd6.conf -pf /var/run/dhpcd6.pid || rc=$?
# check if interfaces specified exist and have addresses
for i in $DHCPD_INTERFACES; do
local details=${1:-0}
# run checkconfig only once
- if [ "$checkconfig" != -1 ]; then
+ if [ $checkconfig -ne -1 ]; then
return $checkconfig
fi
- if [ $details = 1 ]; then
+ if [ "$details" = "1" ]; then
# run config test and display report (status action)
show "Checking %s configuration" "DHCP IPv6 Server"; busy
local out
out=$(configtest 2>&1)
checkconfig=$?
- if [ $checkconfig = 0 ]; then
+ if [ $checkconfig -eq 0 ]; then
ok
else
fail
# (for actions checking status before action).
configtest >/dev/null 2>&1
checkconfig=$?
- if [ $checkconfig != 0 ]; then
+ if [ $checkconfig -ne 0 ]; then
show "Checking %s configuration" "DHCP IPv6 Server"; fail
nls 'Configuration test failed. See details with %s "checkconfig"' $0
exit $checkconfig
checkconfig
msg_starting "DHCP IPv6 Server"
- daemon /sbin/dhcpd -6 -pf -cf /etc/dhcpd6.conf /var/run/dhpcd6.pid -q $DHCPD_INTERFACES
+ daemon /sbin/dhcpd -6 -q -cf /etc/dhcpd6.conf -pf /var/run/dhpcd6.pid $DHCPD_INTERFACES
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd6
}