From cf359fbe02d33d46a3cb1da7067d30765b0dda3b Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Tue, 28 Dec 2010 08:13:11 +0800 Subject: netbase: upgrade to version 4.44 upgrade from 0.43 to 0.44 Signed-off-by: Dongxiao Xu --- meta/recipes-core/netbase/netbase-4.44/init | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 meta/recipes-core/netbase/netbase-4.44/init (limited to 'meta/recipes-core/netbase/netbase-4.44/init') diff --git a/meta/recipes-core/netbase/netbase-4.44/init b/meta/recipes-core/netbase/netbase-4.44/init new file mode 100644 index 000000000..8a67e1cef --- /dev/null +++ b/meta/recipes-core/netbase/netbase-4.44/init @@ -0,0 +1,52 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: networking +# Required-Start: $local_fs mountvirtfs +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: 0 6 +# Short-Description: Raise network interfaces and configure them +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +if ! [ -x /sbin/ifup ]; then + exit 0 +fi + +case "$1" in + start) + echo -n "Configuring network interfaces... " + ifup -a + echo "done." + ;; + stop) + if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | + grep -q "^/ nfs$"; then + echo "NOT deconfiguring network interfaces: / is an NFS mount" + elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | + grep -q "^/ smbfs$"; then + echo "NOT deconfiguring network interfaces: / is an SMB mount" + elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | + grep -qE '^(nfs|smbfs|ncp|coda)$'; then + echo "NOT deconfiguring network interfaces: network shares still mounted." + else + echo -n "Deconfiguring network interfaces... " + ifdown -a + echo "done." + fi + ;; + force-reload|restart) + echo -n "Reconfiguring network interfaces... " + ifdown -a + ifup -a + echo "done." + ;; + *) + echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 -- cgit v1.2.3