]> git.pld-linux.org Git - packages/dhcp.git/commitdiff
- do not use -q flag in configtest(),
authorTomasz Pala <gotar@pld-linux.org>
Thu, 26 Aug 2010 15:50:51 +0000 (15:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- fixed integer comparision tests (again glen...),
- fixed -pf option for dhcpd6 service

Changed files:
    dhcp.init -> 1.28
    dhcp6.init -> 1.13

dhcp.init
dhcp6.init

index 476cb93d410cea2e43db2afd0a4c48a818bb3bc0..1e59529a3001d91bfbc50684d698c0a25096d388 100644 (file)
--- a/dhcp.init
+++ b/dhcp.init
@@ -36,7 +36,7 @@ check_device_up()
 # 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
@@ -55,17 +55,17 @@ checkconfig() {
        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
@@ -77,7 +77,7 @@ checkconfig() {
                # (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
index 13820cdca62e5dabee4f76452cf02f0515cc373a..e2a38ad9866c306e4c80f80ad4ede99dde7a54eb 100644 (file)
@@ -36,7 +36,7 @@ check_device_up()
 # 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
@@ -55,17 +55,17 @@ checkconfig() {
        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
@@ -77,7 +77,7 @@ checkconfig() {
                # (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
@@ -94,7 +94,7 @@ start() {
 
        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
 }
This page took 0.069892 seconds and 4 git commands to generate.