From 9417c8fc2737011403e2a4fe3e9870fed9e1ba15 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 3 Jun 2009 16:35:10 +0000 Subject: Some more steps for PreBoot ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2923 95ad53e4-c205-0410-b2fa-d234c58c8868 --- boot-env/preboot/preboot.sh | 18 +++++++++++++----- boot-env/preboot/uclib-rootfs/init | 7 ++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/boot-env/preboot/preboot.sh b/boot-env/preboot/preboot.sh index dd7cd256..ae96a637 100755 --- a/boot-env/preboot/preboot.sh +++ b/boot-env/preboot/preboot.sh @@ -15,6 +15,13 @@ # get configuration . /etc/initramfs-setup +# bring the mac address into the standard format 01- +client=$(echo 01-$macaddr|sed "s/:/-/g") + +# check if already a configuration is available to decide if user interaction +# is required +# wget -O /tmp/cfg-error $boot_uri/${client} + # Switch here for several boot TYPE=fastboot/directkiosk/cfgkiosk/slxconfig # fastboot - no interaction use system from client config # directkiosk - start the default slx system into kiosk (using vmchooser) @@ -32,6 +39,9 @@ sysname=$(cat result) . ./$sysname sysname=$(readlink $sysname) +# set basic post data information +postdata="system=${sysname}&preboot_id=${preboot_id}&client=${client}" + # ask for desired debug level in stage3 if debug!=0 in preboot echo "0" >result [ x$DEBUGLEVEL != x0 ] && dialog --no-cancel --menu "Choose Debug Level:" \ @@ -48,11 +58,9 @@ else debug="" fi -# bring the mac address into the standard format 01- -client=$(echo 01-$macaddr|sed "s/:/-/g") -# to be replaced by wget --post ... -wget --post-data "?system=${sysname}&preboot_id=${preboot_id}&client=${client}" \ - $boot_uri/cgi-bin/user_settings.pl -O /tmp/cfg-error +# send information to configuration host via http +wget --post-data "$postdata" -O /tmp/cfg-error \ + $boot_uri/cgi-bin/user_settings.pl [ "x$DEBUGLEVEL" != x0 -a grep -qe "Error:" /tmp/cfg-error 2>/dev/null ] && \ dialog --msgbox "An error occured ..." # to be elaborated diff --git a/boot-env/preboot/uclib-rootfs/init b/boot-env/preboot/uclib-rootfs/init index fa4a75d8..5dccd62c 100755 --- a/boot-env/preboot/uclib-rootfs/init +++ b/boot-env/preboot/uclib-rootfs/init @@ -63,11 +63,9 @@ mkdir -p ${devdir}/pts ${devdir}/shm export PATH=/bin:/sbin:/usr/bin/:/usr/sbin # redirect kernel messages to tty10 instead of tty1 -getty -i -n -l /bin/ash 38400 tty10 & +getty -i -n -l /bin/cat 38400 tty10 & setlogcons 10 -dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 - # initramfs-setup configuration (common settings for all clients using a # certain InitRamFS generated by slxmkramfs/mkdxsinitrd) [ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null @@ -80,6 +78,9 @@ nwif="eth0" [ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc [ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys +# give startup information +dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 + # load network adaptor modules for mod in ${ramfs_nicmods} \ af_packet unix hid usbhid uhci-hcd ohci-hcd vesafb fbcon; do -- cgit v1.2.3-55-g7522