summaryrefslogtreecommitdiffstats
path: root/remote/rootfs
diff options
context:
space:
mode:
Diffstat (limited to 'remote/rootfs')
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/functions8
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/inc/setup_stage3210
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init12
-rw-r--r--remote/rootfs/rootfs-stage32/data/etc/modprobe.d/50-mltk-blacklist.conf4
4 files changed, 31 insertions, 3 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/inc/functions b/remote/rootfs/rootfs-stage31/data/inc/functions
index ce510aac..161533ef 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/functions
+++ b/remote/rootfs/rootfs-stage31/data/inc/functions
@@ -23,7 +23,7 @@ drop_shell() {
# Usage:
# read_from_cmdline OPTION
#
-read_from_cmdline(){
+read_from_cmdline() {
[ $# -ne 1 ] && echo "Error - 'read_from_cmdline' requires 1 argument, $# given." && exit 1
local OPTION="$1"
@@ -89,3 +89,9 @@ download() {
return 1
}
+# Add benchmark event to var, including uptime as prefix
+bench_event() {
+ bench_result="${bench_result}$(cut -f 1 -d ' ' "/proc/uptime") $@
+"
+}
+
diff --git a/remote/rootfs/rootfs-stage31/data/inc/setup_stage32 b/remote/rootfs/rootfs-stage31/data/inc/setup_stage32
index ba8bad00..9bf30d25 100755
--- a/remote/rootfs/rootfs-stage31/data/inc/setup_stage32
+++ b/remote/rootfs/rootfs-stage31/data/inc/setup_stage32
@@ -3,7 +3,7 @@
# This script sets up the stage 3.2.
# - downloads/mounts stage32.sqfs
# - merge it with current rootfs through aufs
-# - will not download, if the "nfs=" is used in the
+# - will not download, if the "nfs=" is used in the
# kernel command line
#
#########################################################################
@@ -56,6 +56,14 @@ if [ $SPLASH -eq 1 ]; then
fi
fi
+# Kinda specific for virtualization environment: Autologin and run VM for benchmarks
+if [ -n "$SLX_BENCHMARK_VM" ]; 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
+
# "Delete" addon hook-script in aufs view
touch "/mnt/opt/openslx/uniontmp/.wh.addon-init"
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 8789caa5..95495684 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -19,9 +19,10 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
. "/inc/functions"
# mount the important standard directories
-busybox mount -n -t tmpfs -o 'mode=755' run "/run"
[ ! -f /proc/cpuinfo ] && busybox mount -n -t proc proc /proc
+bench_event "KERNEL" "Kernel initialized"
[ ! -d /sys/class ] && busybox mount -n -t sysfs sysfs /sys
+busybox mount -n -t tmpfs -o 'mode=755' run "/run"
# preparations for mounting stage3.2
FUTURE_ROOT="/dev/shm/uniontmp"
@@ -79,6 +80,7 @@ fi
# discover devices
mdev -s
+bench_event "MDEV" "mdev done"
# suppress kernel output if neither DEBUG nor SPLASH is set
if [ $SPLASH -eq 0 ]; then
@@ -88,14 +90,18 @@ fi
[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell: before network."
. "/inc/setup_network" || . "/inc/setup_network_retry" || drop_shell "Error setting up network"
+bench_event "NETWORK" "Network up and running"
[ $DEBUG -ge 3 ] && drop_shell "Requested Debug Shell: after network/before configuring."
. "/inc/activate_sysconfig" || drop_shell "Could not source /bin/activate_sysconfig"
+bench_event "CONFIG" "Downloaded config"
+# From here on, we have all the vars from /opt/openslx/config
[ $DEBUG -ge 2 ] && drop_shell "Requested Debug Shell: after configuration/before stage32."
. "/inc/setup_stage32" || drop_shell "Problem setting up stage3.2"
+bench_event "STAGE32" "Downloaded stage 3.2"
# copy files needed for stage3.2 to FUTURE_ROOT
echo "Copying busybox etc. to stage32..."
@@ -109,12 +115,16 @@ fi
# one last debug shell if activated
[ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell: before switch_root."
+# need /proc for this ;)
+bench_event "PRESWITCH" "Switching to stage 3.2"
+
# unmount filesystems
for mnt in proc sys run ; do
busybox umount -f -l "/$mnt" 2>/dev/null
done
echo "Switching root...."
+echo "$bench_result" > "${FUTURE_ROOT}/opt/openslx/.benchmark"
# Prepare environment (HOME is needed as a hack for nss_ldap with ssl and no caching)
unset BOOT_IMAGE initrd KCL ip slxbase slxsrv IPINFO vga ip MAC BOOTIF DEBUG OLDPWD
export HOME=/
diff --git a/remote/rootfs/rootfs-stage32/data/etc/modprobe.d/50-mltk-blacklist.conf b/remote/rootfs/rootfs-stage32/data/etc/modprobe.d/50-mltk-blacklist.conf
index 17e42fcf..00be09ca 100644
--- a/remote/rootfs/rootfs-stage32/data/etc/modprobe.d/50-mltk-blacklist.conf
+++ b/remote/rootfs/rootfs-stage32/data/etc/modprobe.d/50-mltk-blacklist.conf
@@ -3,5 +3,9 @@
# Intel corporation 82Q35 Express MEI controller spams syslog under
# some 3.0 kernels
blacklist mei
+
+# pcspeaker device driver
blacklist pcspkr
+
+# Strange device driver for alsa via pcspeaker
blacklist snd-pcsp