Revision 2573,
851 bytes
checked in by daisuke, 14 years ago
(diff) |
fix bash3ism
- bash4's source (or .) command does not search current directory any longer.
|
Rev | Line | |
---|
[1108] | 1 | #!/bin/bash |
---|
| 2 | # configures IPX on $1 if appropriate |
---|
| 3 | |
---|
| 4 | PATH=/sbin:/usr/sbin:/bin:/usr/bin |
---|
| 5 | |
---|
| 6 | if [ "$1" = "" ]; then |
---|
| 7 | echo $"usage: $0 <net-device>" |
---|
| 8 | exit 1 |
---|
| 9 | fi |
---|
| 10 | |
---|
| 11 | # cannot configure IPX with non-existent utilities |
---|
| 12 | [ -x /sbin/ipx_interface ] || exit 0 |
---|
| 13 | |
---|
| 14 | . /etc/sysconfig/network |
---|
| 15 | |
---|
| 16 | case $IPX in yes|true) ;; *) exit 0 ;; esac |
---|
| 17 | |
---|
| 18 | cd /etc/sysconfig/network-scripts |
---|
[2573] | 19 | . /etc/sysconfig/network-scripts/network-functions |
---|
[1108] | 20 | |
---|
| 21 | CONFIG=$1 |
---|
| 22 | [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG |
---|
| 23 | source_config |
---|
| 24 | |
---|
| 25 | for frametype in 802.2 802.3 ETHERII SNAP ; do |
---|
| 26 | framename=$(echo $frametype | sed 's/\./_/') |
---|
| 27 | eval ACT=\$IPXACTIVE_$framename |
---|
| 28 | case $ACT in |
---|
| 29 | yes|true) |
---|
| 30 | eval PRIM=\$IPXPRIMARY_$framename |
---|
| 31 | case $PRIM in |
---|
| 32 | yes|true) primary=-p ;; |
---|
| 33 | *) primary= ;; |
---|
| 34 | esac |
---|
| 35 | eval NUM=\$IPXNETNUM_$framename |
---|
| 36 | /sbin/ipx_interface add $primary $1 $frametype $NUM |
---|
| 37 | ;; |
---|
| 38 | esac |
---|
| 39 | done |
---|
| 40 | |
---|
| 41 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.