################################################################################
# {{{ path, variables, signals, umask, zsh
-export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
+export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
DEBUG="/dev/null"
KERNEL="$(uname -r)"
ARCH="$(uname -m)"
config_fast(){
if checkbootparam 'fast'; then
ewarn "Bootoption fast detected. Skipping startup of grml-quickconfig."
- sed -i 's#^1:.*#1:12345:respawn:/usr/bin/openvt -f -c 1 -w -- /bin/zsh#' /etc/inittab
+ sed -i '/1:/s#/usr/share/grml-scripts/run-welcome#/bin/zsh#' /etc/inittab
/sbin/telinit q ; eend $?
fi
}
fi
if [[ $(grep -c processor /proc/cpuinfo) -gt 1 ]] ; then
- einfo "Detecting CPU:"
+ einfo "Found CPU:"
CPU=$(awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG)
echo $CPU | sed 's/ \{1,\}/ /g'
eend 0
else
- einfo "Detecting CPU: `awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG` " ; eend 0
+ einfo "Found CPU: `awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG` " ; eend 0
fi
# no cpufreq setup inside VirtualBox
if [ -n "$MODULE" -a "$MODULE" != none ]; then
einfo "Loading cpufreq kernel module $MODULE" ; eend 0
else
+ SKIP_CPU_GOVERNOR=1
ewarn "Could not find an appropriate kernel module for cpu frequency scaling." ; eend 1
fi
fi
}
# }}}
+# {{{ stats
+config_stats() {
+ if ! checkbootparam 'nostats' ; then
+ BASE_URL="http://stats.grml.org/report/"
+ ACTION_NAME=Boot
+
+ HOST_ID=$(cat /proc/sys/kernel/random/boot_id)
+
+ grep -q " lm " /proc/cpuinfo && HAS_64BIT="1" || HAS_64BIT="0"
+ DATE_STRING=$(date +'h=%H&m=%M&s=%S')
+ [ -e /etc/grml_version ] && VERSION=$(cat /etc/grml_version) || \
+ VERSION=$(lsb_release -d | awk -F: '{gsub(/^[ \t]+/, "", $2); print $2}')
+
+ PARAMS="$( echo "$CMDLINE" | sed -e 's/=[^ ]*/=VALUE/g' | tr " " "\n"|sort|tr "\n" " " )"
+
+ echo "$CMDLINE" | grep -q -e "fetch|nfsroot" && BOOT="remote"
+ [ -z "$BOOT" ] && BOOT="local"
+
+ ADDITIONAL_PARAMS=""
+ ( [ -n "$COLUMNS" ] && [ -n "$LINES" ] ) && \
+ ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS&res=$((COLUMNS * 8))x$((LINES * 16))"
+
+ URI='$BASE_URL?action=${ACTION_NAME}\&$DATE_STRING\&unique_id=${HOST_ID}\&support_64bit=$HAS_64BIT\&version=$version\&bootup=$BOOT\¶ms=$PARAMS$ADDITIONAL_PARAMS'
+
+ get_remote_file "$URI" "/dev/null" >/dev/null 2>&1 &!
+ fi
+}
+# }}}
# {{{ fix/workaround for unionfs
fix_unionfs(){
if [ -z "$INSTALLED" ]; then
eerror " -> Please use something like xdm, gdm or kdm for starting X on a harddisk system!" ; eend 1
fi
else
- eerror "/usr/X11R6/bin/X is not present on this grml flavour."
+ eerror "/usr/bin/X is not present on this grml flavour."
eerror " -> Boot parameter startx does not work therefore." ; eend 1
fi
fi