summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-01-29 00:22:21 +0100
committerDirk von Suchodoletz2009-01-29 00:22:21 +0100
commitf3adc477f4acd44d1981498a0ca163c359052149 (patch)
tree9829ffee28753e35ba44f5e133ae5a844cb1f5a6
parentWebserver interaction for client configuration. (diff)
downloadcore-f3adc477f4acd44d1981498a0ca163c359052149.tar.gz
core-f3adc477f4acd44d1981498a0ca163c359052149.tar.xz
core-f3adc477f4acd44d1981498a0ca163c359052149.zip
Adding mac address to webserver request ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2554 95ad53e4-c205-0410-b2fa-d234c58c8868
-rwxr-xr-xboot-env/preboot/preboot.sh6
-rwxr-xr-xboot-env/preboot/uclib-rootfs/init5
2 files changed, 8 insertions, 3 deletions
diff --git a/boot-env/preboot/preboot.sh b/boot-env/preboot/preboot.sh
index d0979626..117bd046 100755
--- a/boot-env/preboot/preboot.sh
+++ b/boot-env/preboot/preboot.sh
@@ -28,12 +28,12 @@ sysname=$(cat result)
client=$(echo 01-$macaddr|sed "s/:/-/g")
chvt 4
w3m -o confirm_qq=no \
- $boot_uri/cgi-bin/user_settings.pl?system=${sysname}&preboot_id=${preboot_id}&client=${client}
+ $boot_uri/cgi-bin/user_settings.pl?system=${sysname}\&preboot_id=${preboot_id}\&client=${client}
chvt 1
# fetch kernel and initramfs of selected system
-wget -O /tmp/kernel $boot_uri/$kernel
-wget -O /tmp/initramfs $boot_uri/$initramfs
+wget -O /tmp/kernel $boot_uri/system/$kernel
+wget -O /tmp/initramfs $boot_uri/system/$initramfs
# read primary IP configuration to pass it on
. /tmp/ipstuff
diff --git a/boot-env/preboot/uclib-rootfs/init b/boot-env/preboot/uclib-rootfs/init
index f2e4f50e..7018a1e2 100755
--- a/boot-env/preboot/uclib-rootfs/init
+++ b/boot-env/preboot/uclib-rootfs/init
@@ -129,6 +129,11 @@ fetchip
ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $nwif
ip route add default via $router
+# get the mac address of the boot network adaptor
+macaddr=$(ip link show dev $nwif 2>/dev/null | \
+ sed -n "/ether [0-9e-f]\{2\}:.*/p" | sed -e "s/.*ether //;s/ .*//")
+echo "macaddr=$macaddr" >>/etc/initramfs-setup
+
# at this point a little selection script could be downloaded, which lets the
# user choose what kind of SLX client he wants to get
echo "Fetching preboot interactive part and configuration from the net ..."