summaryrefslogtreecommitdiffstats
path: root/boot-env/pbs/uclib-rootfs/init
diff options
context:
space:
mode:
authorroot2010-04-13 15:49:09 +0200
committerroot2010-04-13 15:49:09 +0200
commit91c3a8df4be49fba4c7398413e15fc9868b94bd0 (patch)
tree7305f330b58eed9a0d9bd01b20ca0efbe8b4f23d /boot-env/pbs/uclib-rootfs/init
parentfix pbs stuff (diff)
parentvirtualization plugin, now with calculation of mem, run-vmgrid and run-virt u... (diff)
downloadcore-91c3a8df4be49fba4c7398413e15fc9868b94bd0.tar.gz
core-91c3a8df4be49fba4c7398413e15fc9868b94bd0.tar.xz
core-91c3a8df4be49fba4c7398413e15fc9868b94bd0.zip
Merge branch 'master' of git@openslx.org:openslx/core
Diffstat (limited to 'boot-env/pbs/uclib-rootfs/init')
-rwxr-xr-xboot-env/pbs/uclib-rootfs/init34
1 files changed, 33 insertions, 1 deletions
diff --git a/boot-env/pbs/uclib-rootfs/init b/boot-env/pbs/uclib-rootfs/init
index 3c992070..847cad87 100755
--- a/boot-env/pbs/uclib-rootfs/init
+++ b/boot-env/pbs/uclib-rootfs/init
@@ -45,7 +45,20 @@ done
# device files get their own filesystem
devdir="/dev"
-mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir}
+mount -n -t tmpfs -o 'size=25%,mode=0755' mdev ${devdir}
+mkdir -p /dev/pts
+mount -t devpts devpts /dev/pts
+echo /sbin/mdev > /proc/sys/kernel/hotplug
+cat > /etc/mdev.conf << "EOF"
+sda* 0:6 0660
+sdb* 0:6 0660
+sg* 0:6 0660
+hda* 0:6 0660
+hdb* 0:6 0660
+EOF
+
+mdev -s
+
export DEBUGLEVEL=0
# create basic device files an directories in dev
@@ -143,6 +156,25 @@ fi
if [ -n "${SSID}" ] ; then
# WLAN setup will most probably change the network interface name stored in
# nwif (to wlan0 or something like that)
+ [ $DEBUGLEVEL -gt 0 ] && echo "set essid to ${essid}";
+ #value of essid unchecked yet
+ # load network adaptor modules
+ cd /lib/modules/$(ls /lib/modules/)/kernel/drivers/net/wireless
+ for mod in $(find . | grep .ko | sed 's,.*/\([^/]*\).ko,\1',); do
+ echo "Mod:";
+ echo $mod;
+ modprobe $mod || echo "module $mod did not load for some reason"
+ usleep 10000
+ done
+ cd /
+ wlanif=$(iwconfig 2>/dev/null|sed -n "/ESSID:/p"|sed "s/ .*//")
+ [ $DEBUGLEVEL -gt 0 ] && echo "wlancard recognized as ${wlanif}";
+ ip link set dev ${wlanif} up
+ if iwconfig ${wlanif} mode managed essid "${essid}"; then
+ nwif=${wlanif}
+ else
+ error " Unable to configure the WLAN interface."
+ fi
:
else
# check here for the active Ethernet link