fi
# }}}
-# {{{ debug
-config_debug(){
- checkbootparam 'debug' && BOOTDEBUG="yes"
- checkbootparam "BOOT_IMAGE=debug" && BOOTDEBUG="yes"
-
- rundebugshell(){
- if [ -n "$BOOTDEBUG" ]; then
- einfo "Starting intermediate shell stage $stage as requested by \"debug\" option."
- if [ grep -q "debug=noscreen" "$CMDLINE" ] ; then
- einfo "Notice that the shell does not provide job handling: ctrl-z, bg and fg won't work!"
- einfo "Just exit the shell to continue boot process..."
- /bin/zsh
- else
- eindent
- if [ -r /etc/grml/screenrc ] ; then
- einfo "Starting GNU screen to be able to use a full featured shell environment."
- einfo "Just exit the shells (and therefore screen) to continue boot process..."
- /bin/zsh -c "screen -c /etc/grml/screenrc"
- else
- einfo "Notice that the shell does not provide job handling: ctrl-z, bg and fg won't work!"
- einfo "Just exit the shell to continue boot process..."
- /bin/zsh
- fi
- eoutdent
- fi
- fi
- }
-}
-# }}}
-
# {{{ log
config_log(){
if checkbootparam 'log' || checkbootparam 'debug' ; then
}
# }}}
-# {{{ 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/=[^ ]*/=x/g' | tr " " "\n"|sort|tr "\n" " " )"
-
- echo "$CMDLINE" | grep -q -e "fetch" -e "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
-}
-# }}}
-
# {{{ start X window system via grml-x
config_x_startup(){
if checkbootparam 'distri'; then
DISTRI="$(getbootparam 'distri' 2>>$DEBUG)"
if [ -r "${LIVECD_PATH}"/desktop/"$DISTRI".jpg ] ; then
- [ -n "$BOOTDEBUG" ] && einfo "Debug: bootoption distri found and file ${LIVECD_PATH}/desktop/${DISTRI} present" && eend 0
# make sure the desktop.jpg file is not a symlink, so copying does not file then
[ -L /usr/share/grml/desktop.jpg ] && rm /usr/share/grml/desktop.jpg
cp "${LIVECD_PATH}"/desktop/"$DISTRI".jpg /usr/share/grml/desktop.jpg