Package: netbase Version: 4.24 Tags: patch The following patch provides a "status" option for the /etc/init.d/networking script.
< Stephen --- netbase-4.24/debian/netbase.init 2006-01-03 17:14:07.000000000 -0500 +++ debian/netbase.init 2006-01-15 17:46:35.000000000 -0500 @@ -6,6 +6,8 @@ # Default-Stop: 0 6 ### END INIT INFO +STATEFILE=/etc/network/run/ifstate + PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" [ -x /sbin/ifup ] || exit 0 @@ -106,8 +108,27 @@ fi ;; +status) + echo -n "Status of networking: " + set +e + status=`grep -v ^lo= "$STATEFILE" 2>&1` + case $? in + 0) + echo configured interfaces: $status + exit 0 + ;; + 1) + echo "no configured interfaces." + exit 3 + ;; + *) + echo "unknown: ${status#grep: }" + exit 4 + esac + ;; + *) - echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}" + echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload|status}" exit 1 ;; esac -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]