Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 110468 Details for
Bug 167330
udev net.sh script for sysvinit/einit/initng
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add einit & initng support to /lib/udev/net.sh
multi-init-net.sh.patch (text/plain), 1.86 KB, created by
Ryan Hope
on 2007-02-17 13:20:24 UTC
(
hide
)
Description:
patch to add einit & initng support to /lib/udev/net.sh
Filename:
MIME Type:
Creator:
Ryan Hope
Created:
2007-02-17 13:20:24 UTC
Size:
1.86 KB
patch
obsolete
>--- /lib/udev/net.sh 2007-02-12 10:40:46.000000000 -0500 >+++ /root/einit/trunk/distro/gentoo/root/lib/udev/net.sh 2007-01-26 17:07:34.000000000 -0500 >@@ -2,27 +2,65 @@ > # > # net.sh: udev external RUN script > # >-# Copyright 2007 Roy Marples <uberlord@gentoo.org> >-# Distributed under the terms of the GNU General Public License v2 > >-IFACE=$1 >-ACTION=$2 >+IFACE="$1" >+ACTION="$2" > >-SCRIPT=/etc/init.d/net.$IFACE >+if grep -q initng /proc/1/cmdline >+then >+ EXEC="/sbin/ngc" >+ INITNG="yes" >+ EINIT="no" >+elif grep -q einit /proc/1/cmdline >+then >+ EXEC="/sbin/einit-control" >+ INITNG="no" >+ EINIT="yes" >+else >+ EXEC="/etc/init.d/net.${IFACE}" >+ INITNG="no" >+ EINIT="no" >+fi > >-# ignore interfaces that are registered after being "up" (?) >-case ${IFACE} in >- ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*) >- exit 0 ;; >+case "${ACTION}" in >+ start) >+ if [ "${INITNG}" = "yes" ] >+ then >+ ARGS="-u net/${IFACE}" >+ elif [ "${EINIT}" = "yes" ] >+ then >+ ARGS="rc net-${IFACE} enable" >+ else >+ ARGS="--quiet start" >+ fi >+ ;; >+ stop) >+ if [ "${INITNG}" = "yes" ] >+ then >+ ARGS="-d net/${IFACE}" >+ elif [ "${EINIT}" = "yes" ] >+ then >+ ARGS="rc net-${IFACE} disable" >+ else >+ ARGS="--quiet stop" >+ fi >+ ;; >+ *) >+ echo "$0: wrong arguments" >&2 >+ echo "Call with <interface> <start|stop>" >&2 >+ exit 1 >+ ;; > esac > >-if [ ! -x "${SCRIPT}" ] ; then >- logger -t udev-net.sh "${SCRIPT}: does not exist or is not executable" >+export IN_HOTPLUG=1 >+ >+if [ -x "${EXEC}" ] >+then >+ ${EXEC} ${ARGS} >+ exit 0 >+else >+ logger -t netplug "Error: Couldn't configure ${IFACE}, no ${EXEC} !" > exit 1 > fi > >-# If we're stopping then sleep for a bit in-case a daemon is monitoring >-# the interface. This to try and ensure we stop after they do. >-[ "${ACTION}" == "stop" ] && sleep 2 >- >-IN_HOTPLUG=1 "${SCRIPT}" --quiet "${ACTION}" >+# vim: set ts=4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 167330
:
110468