summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/settings/networksettings2/setmacaddress.sh15
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
2getmac() {
3 echo $5
4}
5
2BDIR=/opt/QtPalmtop/etc/networktemplates 6BDIR=/opt/QtPalmtop/etc/networktemplates
3[ ! -z "$1" -a -f ${BDIR}/$1.mac ] && ifconfig $1 hw ether `cat ${BDIR}/$1.mac` 7if [ -f ${BDIR}/$1.mac ]
8then
9# store
10ifconfig $1 hw ether `cat ${BDIR}/$1.mac`
11else
12# set
13mkdir -p $1
14i=`ifconfig $1 | grep -i hwaddr`
15getmac ${i} > ${BDIR}/$1.mac
16fi
4exit 0 17exit 0