Fix named.init check against returned values by bind (#4039)
authorFlorian Fainelli <florian@openwrt.org>
Sat, 27 Sep 2008 10:49:17 +0000 (10:49 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 27 Sep 2008 10:49:17 +0000 (10:49 +0000)
SVN-Revision: 12724

net/bind/files/named.init

index 99b8e0b..b845e89 100644 (file)
@@ -9,7 +9,7 @@ start() {
 
   /usr/sbin/named -c $config_file
 
-  if [ $$ -eq 0 ]
+  if [ $? -eq 0 ]
   then
     echo "  isc-bind failed to start"
   fi
@@ -21,7 +21,7 @@ stop() {
   then
     kill `cat $pid_file`
 
-    if [ $$ -eq 0 ]
+    if [ $? -eq 0 ]
     then
       echo "  PID " `cat $pid_file` not found
       echo "  Is the named server running?"