Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 46663 Details for
Bug 68190
Idea for network initscripts.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
/usr/sbin/ifplugd.action
ifplugd.action (text/plain), 2.13 KB, created by
Thomas Bettler
on 2004-12-22 14:03:32 UTC
(
hide
)
Description:
/usr/sbin/ifplugd.action
Filename:
MIME Type:
Creator:
Thomas Bettler
Created:
2004-12-22 14:03:32 UTC
Size:
2.13 KB
patch
obsolete
>#!/bin/sh ># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/gentoo-ifplugd.action-v2,v 1.3 2004/07/15 00:43:53 agriffis Exp $ ># ># Gentoo-specific ifplugd.action ># ># This file gets called by ifplugd when it wants to bring an interface ># up or down. ># > >##################################################################################### ># added to support pre&post-up&down functionality for ifplugd > ># Only for completeness >preup() { > echo -ne " running preup function... " > echo " done." >} > ># To (re)start all services depending on net >postup() { > echo -ne " running postup function... " > runlevel=$(grep "l$(runlevel | awk '{ print $2 }'):" /etc/inittab | awk '{ print $2 }') > for i in /etc/runlevels/${runlevel}/* > do > echo "$($i ineed)" | grep -x "net" > /dev/null && \ > #$i status | grep "stopped" > /dev/null && \ > echo -ne "\n restarting $(basename $i)... \n" && $i restart > done > echo " done." >} > ># Try to stop all services depending on net >predown() { > echo -ne " running predown function... " ># This part is not necessary, as "/etc/init.d/net.ethX stop" already stops all services depending on net ># runlevel=$(grep "l$(runlevel | awk '{ print $2 }'):" /etc/inittab | awk '{ print $2 }') ># for i in /etc/runlevels/${runlevel}/* ># do ># echo "$($i ineed)" | grep -x "net" > /dev/null && \ ># $i status | grep "started" > /dev/null && \ ># echo -ne "\n restarting $(basename $i)... \n" && $i stop ># done > echo " done." >} > ># Only for completeness >postdown() { > echo -ne " running postdown function... " > echo " done." >} > >##################################################################################### > >case "$2" in > up) > state=start > ;; > down) > state=stop > ;; > *) > echo "$0: wrong arguments" > echo "Call with <interface> <up|down>" > exit 1 > ;; >esac > >if [ -x /etc/init.d/net.$1 ] >then > [ $2 = "up" ] && preup > [ $2 = "down" ] && predown > /etc/init.d/net.$1 --quiet $state > [ $2 = "up" ] && postup > [ $2 = "down" ] && postdown > exit 0 >else > logger -t ifplugd.action "Error: Couldn't configure $1, no /etc/init.d/net.$1 script!" > exit 1 >fi
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 Raw
Actions:
View
Attachments on
bug 68190
:
46660
| 46663