clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 055aa17 was 163a6701, checked in by Jim Gifford <clfs@…>, 19 years ago |
r720@server (orig r718): jim | 2005-11-18 08:06:26 -0800
Added bootscripts to cross-lfs svn
|
-
Property mode
set to
100755
|
File size:
1.3 KB
|
Rev | Line | |
---|
[163a6701] | 1 | #!/bin/sh
|
---|
| 2 | #
|
---|
| 3 | # Network hotplug policy agent for LFS
|
---|
| 4 | #
|
---|
| 5 | # Kernel NET hotplug params include:
|
---|
| 6 | #
|
---|
| 7 | # ACTION=%s [register or unregister]
|
---|
| 8 | # INTERFACE=%s
|
---|
| 9 | #
|
---|
| 10 | # HISTORY:
|
---|
| 11 | #
|
---|
| 12 | # 05-Mar-2005 Initial version of LFS Version
|
---|
| 13 | #
|
---|
| 14 | #
|
---|
| 15 |
|
---|
| 16 | cd /etc/hotplug
|
---|
| 17 | . ./hotplug.functions
|
---|
| 18 | #DEBUG=yes export DEBUG
|
---|
| 19 |
|
---|
| 20 | if [ "$INTERFACE" = "" ]; then
|
---|
| 21 | mesg Bad NET invocation: \$INTERFACE is not set
|
---|
| 22 | exit 1
|
---|
| 23 | fi
|
---|
| 24 |
|
---|
| 25 | case $ACTION in
|
---|
| 26 | add|register)
|
---|
| 27 |
|
---|
| 28 | case $INTERFACE in
|
---|
| 29 | # interfaces that are registered after being "up" (?)
|
---|
| 30 | ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)
|
---|
| 31 | debug_mesg assuming $INTERFACE is already up
|
---|
| 32 | exit 0
|
---|
| 33 | ;;
|
---|
| 34 | # interfaces that are registered then brought up
|
---|
| 35 | *)
|
---|
| 36 | # LFS
|
---|
| 37 | export IN_HOTPLUG=1
|
---|
| 38 | debug_mesg invoke ifup $INTERFACE
|
---|
| 39 | exec /etc/sysconfig/network-devices/ifup $INTERFACE
|
---|
| 40 | ;;
|
---|
| 41 | esac
|
---|
| 42 | mesg $1 $ACTION event not handled
|
---|
| 43 | ;;
|
---|
| 44 |
|
---|
| 45 | remove|unregister)
|
---|
| 46 |
|
---|
| 47 | case $INTERFACE in
|
---|
| 48 | # interfaces that are unregistered after being "down" (?)
|
---|
| 49 | ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)
|
---|
| 50 | debug_mesg assuming $INTERFACE is already down
|
---|
| 51 | exit 0
|
---|
| 52 | ;;
|
---|
| 53 | *)
|
---|
| 54 | # LFS
|
---|
| 55 | export IN_HOTPLUG=1
|
---|
| 56 | debug_mesg invoke ifdown $INTERFACE
|
---|
| 57 | exec /etc/sysconfig/network-devices/ifdown $INTERFACE
|
---|
| 58 | ;;
|
---|
| 59 | esac
|
---|
| 60 | mesg $1 $ACTION event not handled
|
---|
| 61 | ;;
|
---|
| 62 |
|
---|
| 63 | *)
|
---|
| 64 | debug_mesg NET $ACTION event for $INTERFACE not supported
|
---|
| 65 | exit 1 ;;
|
---|
| 66 |
|
---|
| 67 | esac
|
---|
Note:
See
TracBrowser
for help on using the repository browser.