author | wimpie <wimpie> | 2004-04-05 07:14:58 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-05 07:14:58 (UTC) |
commit | c1bed3e1103b56236f77273cd586c1c3645702da (patch) (unidiff) | |
tree | 23be835b56ba63150c926dbf8c80359578ec125a /noncore/settings | |
parent | e6e31e93aa55bb967a044fe3660201000a6e59b0 (diff) | |
download | opie-c1bed3e1103b56236f77273cd586c1c3645702da.zip opie-c1bed3e1103b56236f77273cd586c1c3645702da.tar.gz opie-c1bed3e1103b56236f77273cd586c1c3645702da.tar.bz2 |
forgot to store mac if needed
-rwxr-xr-x | noncore/settings/networksettings2/setmacaddress.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/setmacaddress.sh b/noncore/settings/networksettings2/setmacaddress.sh index f9abca2..10c6cc6 100755 --- a/noncore/settings/networksettings2/setmacaddress.sh +++ b/noncore/settings/networksettings2/setmacaddress.sh | |||
@@ -1,4 +1,17 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | getmac() { | ||
3 | echo $5 | ||
4 | } | ||
5 | |||
2 | BDIR=/opt/QtPalmtop/etc/networktemplates | 6 | BDIR=/opt/QtPalmtop/etc/networktemplates |
3 | [ ! -z "$1" -a -f ${BDIR}/$1.mac ] && ifconfig $1 hw ether `cat ${BDIR}/$1.mac` | 7 | if [ -f ${BDIR}/$1.mac ] |
8 | then | ||
9 | # store | ||
10 | ifconfig $1 hw ether `cat ${BDIR}/$1.mac` | ||
11 | else | ||
12 | # set | ||
13 | mkdir -p $1 | ||
14 | i=`ifconfig $1 | grep -i hwaddr` | ||
15 | getmac ${i} > ${BDIR}/$1.mac | ||
16 | fi | ||
4 | exit 0 | 17 | exit 0 |