[oe-commits] Chia-I Wu : fastboot: netbase: No longer parse /etc/network/options.
GIT User account
git at amethyst.openembedded.net
Wed Dec 17 12:56:44 UTC 2008
Module: openembedded.git
Branch: john_lee/openmoko-merges
Commit: f1b613960477e22a14cf393d2a9da915ba1e7786
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f1b613960477e22a14cf393d2a9da915ba1e7786
Author: Chia-I Wu <olv at openmoko.com>
Date: Thu Oct 30 16:16:14 2008 +0800
fastboot: netbase: No longer parse /etc/network/options.
---
packages/netbase/netbase/openmoko/init | 45 +++++++++++++++++++++++++++++
packages/netbase/netbase/openmoko/options | 1 +
2 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/packages/netbase/netbase/openmoko/init b/packages/netbase/netbase/openmoko/init
new file mode 100644
index 0000000..ae592f6
--- /dev/null
+++ b/packages/netbase/netbase/openmoko/init
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# manage network interfaces and configure some networking options
+
+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
diff --git a/packages/netbase/netbase/openmoko/options b/packages/netbase/netbase/openmoko/options
new file mode 100644
index 0000000..1cbffcb
--- /dev/null
+++ b/packages/netbase/netbase/openmoko/options
@@ -0,0 +1 @@
+# DEPRECATED by /etc/sysctl.conf
More information about the Openembedded-commits
mailing list