1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-25 18:57:02 +00:00
Files
Khem Raj 3c54f46ed7 netbase: Upgrade version 4.44 to 4.45
(From OE-Core rev: 0fafcf7efeab8f9a5978f4b0693340a2746d7078)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-15 01:18:52 +00:00

53 lines
1.4 KiB
Bash

#!/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