Revision 2573,
678 bytes
checked in by daisuke, 14 years ago
(diff) |
fix bash3ism
- bash4's source (or .) command does not search current directory any longer.
|
Line | |
---|
1 | #! /bin/bash |
---|
2 | |
---|
3 | . /etc/init.d/functions |
---|
4 | |
---|
5 | cd /etc/sysconfig/network-scripts |
---|
6 | . /etc/sysconfig/network-scripts/network-functions |
---|
7 | |
---|
8 | [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network |
---|
9 | |
---|
10 | CONFIG=${1} |
---|
11 | |
---|
12 | source_config |
---|
13 | |
---|
14 | # On hotplug events, just bring the virtual device up as if it's normal Ethernet |
---|
15 | if [ -n "$IN_HOTPLUG" ]; then |
---|
16 | exec /etc/sysconfig/network-scripts/ifdown-eth ${CONFIG} $2 |
---|
17 | fi |
---|
18 | |
---|
19 | stop_panu() |
---|
20 | { |
---|
21 | kill -TERM `cat /var/run/pand-${DEVICE}.pid` |
---|
22 | } |
---|
23 | |
---|
24 | stop_nap() |
---|
25 | { |
---|
26 | kill -TERM `cat /var/run/pand-${DEVICE}.pid` |
---|
27 | /usr/bin/pand -K |
---|
28 | } |
---|
29 | |
---|
30 | stop_gn() |
---|
31 | { |
---|
32 | : |
---|
33 | } |
---|
34 | |
---|
35 | case "$ROLE" in |
---|
36 | PANU) |
---|
37 | stop_panu |
---|
38 | ;; |
---|
39 | NAP) |
---|
40 | stop_nap |
---|
41 | ;; |
---|
42 | GN) |
---|
43 | stop_gn |
---|
44 | ;; |
---|
45 | *) |
---|
46 | echo Unknown BNEP mode :$ROLE |
---|
47 | ;; |
---|
48 | esac |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.