kill 2>/dev/null as we just interested in if we can signal it or not.
[openresolv] / resolvconf.in
index 274a8bf8de36d6f279af93de5d20c9fc7e312fc9..06f460fa7eaf7cf5d9712828dcec91aa5051718c 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/sh
-# Copyright 2006 Gentoo Foundation
 # Copyright 2007 Roy Marples
 # All rights reserved
 
@@ -105,11 +104,11 @@ if [ "x${CMD}" = "x-s" ]; then
        # If restarting check if service is running or not if we can
        if [ "x${ACTION}" = "xrestart" ]; then
                if [ -s /var/run/"${SERVICE}".pid ]; then
-                       kill -0 $(cat /var/run/"${SERVICE}".pid)
+                       kill -0 $(cat /var/run/"${SERVICE}".pid) 2>/dev/null
                elif [ -s /var/run/"${SERVICE}"/"${SERVICE}".pid ]; then
-                       kill -0 $(cat /var/run/"${SERVICE}".pid)
+                       kill -0 $(cat /var/run/"${SERVICE}".pid) 2>/dev/null
                elif [ -s /var/run/"${SERVICE}"/pid ]; then
-                       kill -0 $(cat /var/run/"${SERVICE}"/pid)
+                       kill -0 $(cat /var/run/"${SERVICE}"/pid) 2>/dev/null
                else
                        false
                fi
@@ -141,8 +140,7 @@ if [ -n "$1" ]; then
        shift
 fi
 
-# -l is a Gentoo option that lists our resolv files
-# optionally for a specific interface
+# -l lists our resolv files, optionally for a specific interface
 if [ "x${CMD}" = "x-l" -o "x${CMD}" = "x-i" ]; then
        [ -d "${IFACEDIR}" ] || exit 0