summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage31/data
diff options
context:
space:
mode:
Diffstat (limited to 'remote/rootfs/rootfs-stage31/data')
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig17
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/setup_network11
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/setup_stage326
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init4
4 files changed, 28 insertions, 10 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
index 39680afc..ec98ff70 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
+++ b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
@@ -5,8 +5,6 @@ echo "Configuring stage 3.2 ..."
# first a few variables
CONFIG="${FUTURE_ROOT}/opt/openslx/config"
-UUID=$(dmidecode -s system-uuid | grep -m1 -E '^[0-9A-F\-]{36}$')
-
#########################################################################
#
# This function downloads the config containing environment variables
@@ -15,7 +13,7 @@ fetch_sysconfig() {
[ -e "$CONFIG" ] && grep -E '^#_RCONFIG_TAG$' "$CONFIG" > /dev/null \
&& echo "Config already fetched." && return 0
- download "${SLX_BASE_PATH}/config?uuid=${UUID}" "${CONFIG}-remote" || return 1
+ download "${SLX_BASE_PATH}/config" "${CONFIG}-remote" || return 1
echo "# Config fetched from $URL" >> "$CONFIG"
echo "#_RCONFIG_TAG" >> "$CONFIG"
@@ -28,7 +26,7 @@ fetch_sysconfig() {
fetch_config_files() {
[ -e "${CONFIG}.tgz" ] && echo "config.tgz already downloaded." && return 0
- download "${SLX_BASE_PATH}/config.tgz?uuid=${UUID}" "${CONFIG}.tgz"
+ download "${SLX_BASE_PATH}/config.tgz" "${CONFIG}.tgz"
}
@@ -98,6 +96,17 @@ HEREEND
#
fetch_sysconfig || drop_shell "Could not download remote config"
+if ! ash -n "${CONFIG}-remote"; then
+ echo -e "\n\tFATAL: Could not download configuration!"
+ echo -e "\tAborting boot since the system would be in an unusable state."
+ echo -en "\tRebooting in 60 seconds"
+ timeout=60
+ while [ $(( timeout-- )) -gt 0 ]; do
+ echo -n "."
+ sleep 1
+ done
+ echo b > /proc/sysrq-trigger
+fi
. "${CONFIG}-remote" || drop_shell "Could not source remote config"
fetch_config_files || drop_shell "Could not download config.tgz"
update_sysconfig || drop_shell "Could not update sysconfig"
diff --git a/remote/rootfs/rootfs-stage31/data/inc/setup_network b/remote/rootfs/rootfs-stage31/data/inc/setup_network
index 13c52289..956df03c 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/setup_network
+++ b/remote/rootfs/rootfs-stage31/data/inc/setup_network
@@ -26,14 +26,21 @@ mkdir -p "${FUTURE_ROOT}/etc/udev/rules.d"
IP_OUT=$(ip a | grep -B 1 "/ether" | sed -r '/^--$/d;$!N;s#^[0-9]+: ([a-z0-9\.:]+): .*?/ether ([0-9a-fA-Z:]+) .*$#\1==\2#')
if ! echo "$IP_OUT" | grep -q -- "$MAC"; then
- drop_shell "Boot interface not found in interface list. NIC driver missing?"
+ drop_shell "---
+$(ip a)
+---
+$IP_OUT
+---
+
+Boot interface $MAC not found in interface list. NIC driver missing?"
+ :
fi
for LINE in $IP_OUT; do
IFACE=$(echo "$LINE" | awk -F '==' '{printf $1}')
IFMAC=$(echo "$LINE" | awk -F '==' '{printf $2}' | tr '[A-Z]' '[a-z]') # udev requires mac addesses to be lowercase (a-f), see http://www.debianhelp.co.uk/udev.htm
echo "${IFACE} = ${IFMAC}"
-
+
if [ "x$IFMAC" == "x$MAC" ]; then
brctl addbr "$BRIDGE" || drop_shell "Could not create bridge $BRIDGE"
brctl stp "$BRIDGE" 0
diff --git a/remote/rootfs/rootfs-stage31/data/inc/setup_stage32 b/remote/rootfs/rootfs-stage31/data/inc/setup_stage32
index 5ec5a69d..070583aa 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/setup_stage32
+++ b/remote/rootfs/rootfs-stage31/data/inc/setup_stage32
@@ -58,11 +58,9 @@ if [ $SPLASH -eq 1 ]; then
fi
fi
-# Kinda specific for virtualization environment: Autologin and run VM for benchmarks
-if [ -n "$SLX_BENCHMARK_VM" ]; then
+# Auto login to demo user requested?
+if [ -n "$SLX_AUTOLOGIN" ]; then
# Enable KDM autologin for demo user
sed -i 's/^AutoLoginUser=.*//;s/^AutoLoginEnable=.*/AutoLoginEnable=true\nAutoLoginUser=demo/' "${FUTURE_ROOT}/etc/kde4/kdm/kdmrc"
- # Running the VM automatically has to be taken care of by run-virt and vmchooser. SLX_BENCHMARK_VM should contain
- # a numeric value for the index in vmchooser
fi
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 5e6d1caf..4b3a800b 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -118,6 +118,10 @@ for mnt in proc sys run ; do
done
# HACK HACK: Klausurmodus
+if [ "x$SLX_PVS_DEDICATED" = "xyes" ] || [ "x$SLX_PVS_HYBRID" = "xyes" ]; then
+ sed -i '/^SLX_EXAM=/d' "${FUTURE_ROOT}/opt/openslx/config"
+ SLX_EXAM=
+fi
# Putting this here as we're hopefully moving to the all new dracut solution soon
# so there's no reason to make it pretty now
if [ -n "$SLX_EXAM" ]; then