From efd6786e49003dac27e4ff9f038a1e134ce43cca Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 22 Oct 2006 22:24:17 +0000 Subject: [PATCH 1/1] * initial checkin --- autoconfig | 119 +++ autoconfig.functions | 2088 +++++++++++++++++++++++++++++++++++++ autoconfig.small | 119 +++ debian/changelog | 1231 ++++++++++++++++++++++ debian/compat | 1 + debian/control | 21 + debian/copyright | 27 + debian/overrides | 2 + debian/postinst | 41 + debian/postrm | 20 + debian/rules | 68 ++ etc/grml/modules | 11 + etc/grml/partconf | 4 + etc/init.d/grml-autoconfig.strace | 12 + grml-autoconfig | 268 +++++ grml-bootsplash | 87 ++ language-functions | 815 +++++++++++++++ man/grml-autoconfig.8 | 76 ++ man/grml-bootsplash.1 | 27 + sbin/grml-autoconfig | 112 ++ 20 files changed, 5149 insertions(+) create mode 100644 autoconfig create mode 100755 autoconfig.functions create mode 100644 autoconfig.small create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/overrides create mode 100755 debian/postinst create mode 100755 debian/postrm create mode 100755 debian/rules create mode 100644 etc/grml/modules create mode 100644 etc/grml/partconf create mode 100755 etc/init.d/grml-autoconfig.strace create mode 100755 grml-autoconfig create mode 100755 grml-bootsplash create mode 100644 language-functions create mode 100644 man/grml-autoconfig.8 create mode 100644 man/grml-bootsplash.1 create mode 100755 sbin/grml-autoconfig diff --git a/autoconfig b/autoconfig new file mode 100644 index 0000000..86f2ef2 --- /dev/null +++ b/autoconfig @@ -0,0 +1,119 @@ +# Filename: /etc/grml/autoconfig +# Purpose: configuration for grml-autoconfig +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Sam Sep 23 20:06:23 CEST 2006 [mika] +################################################################################ + +################################################################################ +# Notice: you can configure grml-autoconfig via adjusting the following values. +# Set them to 'yes' to activate them. But please notice that some options +# require an additional bootparam ("cheatcode") anyway, some options just +# de-/activate a check! +# +# If you want to deactivate an option just set it to 'no'. +# +# Take a look at the script 'grml-autoconfig' as well! +################################################################################ + +## These are the options you might want to adjust: ############################# + +# configure language - set keyboard layout +# notice: overwriting this variable is still possible through +# bootparameter lang=... +# See http://grml.org/faq/#language for more information. +# default: us +# LANGUAGE='de' + +# console font +# default: Lat15-Terminus16 +# CONSOLEFONT='iso15graf-16' + +# display information on running kernel +CONFIG_KERNEL='yes' + +# check for network devices and run dhclient +CONFIG_DHCP='yes' + +# check for frequency-scalable CPU and activate cpydyn/powernowd +CONFIG_CPU='yes' + +# create /etc/fstab (this also de-/activates swap-partition) +CONFIG_FSTAB='yes' + +# load ACPI/APM modules +CONFIG_ACPI_APM='yes' + +# Enable DMA for all IDE drives - already done in initrd +# but make sure it's done also on harddisk-installed systems +CONFIG_DMA='yes' + +# set audio volumes +CONFIG_MIXER='yes' + +# start syslog-ng +CONFIG_SYSLOG='yes' + +# start gpm +CONFIG_GPM='yes' + +################################################################################ +# Notice! Do not touch the following options except you really know +# what you are doing! +CONFIG_915RESOLUTION='yes' # run 915resolution with specified options for adjusting resolution +CONFIG_AGP='yes' # check for bootparam forceagp +CONFIG_AUTOMOUNTER='no' # activate automounter +CONFIG_AUTOMOUNT='yes' # automounting of device labeled GRMLCFG +CONFIG_BLANKING='yes' # check for bootoption noblank to disable console blanking +CONFIG_BLINDSOUND='yes' # play 'beep' and play welcome message +CONFIG_BLIND='yes' # check for blind option or brltty +CONFIG_CDROM_PERM='yes' # for burning on IDE-CD-Roms, k3b (and others) check for special permissions +CONFIG_CDROM_SCRIPTS='yes' # run scripts from /cdrom/scripts +CONFIG_CONSOLE='yes' # activate mgetty when using console=... as bootparam +CONFIG_CREATE_MNT_DIRS='no' # create /mnt-directories +CONFIG_DEBNET='yes' # search for /etc/network/interfaces on partitions and set up network afterwards +CONFIG_DEBUG='yes' # activate start of shells during startup at several stages +CONFIG_DISCOVER='no' # use discover for hardware detection +CONFIG_DISTCC='yes' # activate and setup distcc through bootparam distcc=$NETWORK,$INTERFACE +CONFIG_EXTRACT='yes' # specify which (only in combination with bootparam myconfig/netconfig useful) +CONFIG_FAST='yes' # skip startup of w3m on tty1 +CONFIG_FIREWIRE_DEV='no' # bugfix for kernel >=2.6.11 - create some firewire-devices +CONFIG_FIX_PASSWD='yes' # fix unionfs-problem with passwd +CONFIG_FIX_UNIONFS='yes' # fix/workaround for unionfs +CONFIG_USERFSTAB='yes' # check for username of uid 1000 +CONFIG_FWTIMEOUT='yes' # set timeout for firmware loading +CONFIG_GRML2HD='yes' # check for 'grml2hd' bootoption +CONFIG_HOMEDIR='yes' # check for persistent homedir option +CONFIG_HOSTNAME='yes' # set hostname to 'grml' on systems running from CD +CONFIG_HOTPLUG_MAIN='no' # start hotplug system [should be handled by udev now] +CONFIG_HOTPLUG_AGENT='no' # deactivate specific hotplug agent(s) via bootparam +CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam +CONFIG_HWINFO='no' # run hwinfo for module-detection (requires bootparam 'hwinfo'!) +CONFIG_INTERACTIVE='yes' # check for expert-mode as bootparam +CONFIG_LANGUAGE='yes' # allow language specification via commandline +CONFIG_LD_MOD='yes' # run ldconfig and depmod on systems running from harddisk; remove /etc/grml.first.boot for forcing +CONFIG_LOCAL_NET='yes' # bring up loopback interface +CONFIG_LOG='yes' # DEBUG=/dev/null or logfile int /tmp/... +CONFIG_MODEM='yes' # check for AC'97 Modem Controller modem +CONFIG_MODULES='yes' # load modules specified in /etc/grml/modules +CONFIG_MOUSE='yes' # show mouse information (expert-mode) +CONFIG_MYCONFIG='yes' # check if we want the config floppy +CONFIG_NETCONFIG='yes' # download configuration archive provided by bootoption netconfig=... +CONFIG_NETIPV6='yes' # check for bootparam ipv6 +CONFIG_PASSWD='yes' # set password via bootparam passwd +CONFIG_PCMCIA='no' # check for pcmcia and start cardmgr +CONFIG_SERVICES='yes' # check for services to run, provided via bootparam +CONFIG_SETKEYCODES='yes' # run setkeycodes when bootoption setkeycodes found +CONFIG_SMALL='yes' # use a less "bloat" /etc/inittab for small computer with less RAM +CONFIG_SPLASH='yes' # bootsplash +CONFIG_SSH='yes' # check for bootparam ssh +CONFIG_SWSPEAK='yes' # run software synthesizer via speakup +CONFIG_TESTCD='yes' # CD checker +CONFIG_TIME='yes' # set clock, check for bootparam utc/gmt [only in live-mode] +CONFIG_TIMEZONE='yes' # get bootparam 'tz' and set it as /etc/localtime [only in live-mode] +CONFIG_VMWARE='yes' # vmware specific stuff (use xorg.conf.vmware) +CONFIG_WELCOME='yes' # play welcome sound (audio) +CONFIG_WONDERSHAPER='yes' # start wondershaper with options provided via bootparam +CONFIG_XSTARTUP='yes' # start X window system via grml-x [only in live-mode] +## END OF FILE ################################################################# diff --git a/autoconfig.functions b/autoconfig.functions new file mode 100755 index 0000000..ba0fe2c --- /dev/null +++ b/autoconfig.functions @@ -0,0 +1,2088 @@ +#!/bin/zsh +# Filename: autoconfig.functions +# Purpose: basic system configuration and hardware setup for grml system +# Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Don Okt 12 13:00:04 CEST 2006 [mika] +################################################################################ + +# {{{ path, variables, signals, umask, zsh +export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin" +DEBUG="/dev/null" +KERNEL="$(uname -r)" +umask 022 + +# Ignore these signals in non-interactive mode: INT, TERM, SEGV +[ -z "$PS1" ] && trap "" 2 3 11 + +# zsh stuff +iszsh(){ +if [ -n "$ZSH_VERSION" ] ; then + return 0 +else + return 1 +fi +} +# avoid 'no matches found: ...' +iszsh && setopt no_nomatch # || echo "Warning: not running under zsh!" +# }}} + +### {{{ Utility Functions + +# Simple shell grep +stringinfile(){ + case "$(cat $2)" in *$1*) return 0;; esac + return 1 +} + +# same for strings +stringinstring(){ + case "$2" in *$1*) return 0;; esac + return 1 +} + +# Reread boot command line; echo last parameter's argument or return false. +getbootparam(){ + stringinstring " $1=" "$CMDLINE" || return 1 + result="${CMDLINE##*$1=}" + result="${result%%[ ]*}" + echo "$result" + return 0 +} + +# Check boot commandline for specified option +checkbootparam(){ + stringinstring " $1" "$CMDLINE" + return "$?" +} + +checkvalue(){ + if [ "$1" = "yes" ] ; then + return 0 + else + return 1 + fi +} + +checkgrmlsmall(){ + grep -q small /etc/grml_version 2>>$DEBUG && return 0 || return 1 +} + +checkgrmlusb(){ + grep -q usb /etc/grml_version 2>>$DEBUG && return 0 || return 1 +} +### }}} + +# {{{ filesystems (proc, pts, sys) and fixes +mount_proc(){ + [ -f /proc/version ] || mount -t proc /proc /proc 2>/dev/null +} + +mount_pts(){ + stringinfile "/dev/pts" /proc/mounts || mount -t devpts /dev/pts /dev/pts 2>/dev/null +} + +mount_sys(){ + [ -d /sys/devices ] || mount -t sysfs /sys /sys 2>/dev/null +} +# }}} + +# {{{ Read in boot parameters +CMDLINE="$(cat /proc/cmdline)" +[ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/* | tr '\n' ' ')" +# }}} + +# {{{ Check if we are running from the grml-CD or HD +INSTALLED="" +[ -e /GRML/etc/grml_cd ] || INSTALLED="yes" + +# testcd +TESTCD="" +checkbootparam "testcd" >>$DEBUG 2>&1 && TESTCD="yes" +# }}} + +# {{{ source lsb-functions , color handling +if checkbootparam "nocolor"; then + RC_NOCOLOR=yes + . /etc/grml/lsb-functions + einfo "Disabling colors in bootsequence as requested on commandline." ; eend 0 +else + . /etc/grml/lsb-functions + . /etc/grml_colors +fi +# }}} + +# {{{ debug +config_debug(){ + if checkbootparam "debug"; then + BOOTDEBUG="yes" + fi + if stringinstring "BOOT_IMAGE=debug " "$CMDLINE" ; then + BOOTDEBUG="yes" + fi + rundebugshell(){ + if [ -n "$BOOTDEBUG" ]; then + einfo "Starting intermediate shell stage $stage as requested by \"debug\" option." + 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 + } +} +# }}} + +# {{{ log +config_log(){ +if checkbootparam "log"; then + export DEBUG="/tmp/grml.log.`date +%Y%m%d`" + touch $DEBUG + einfo "Bootparameter log found. Log files: ${DEBUG} and /var/log/boot." + eindent + einfo "Starting bootlogd." + bootlogd -r -c 1>>$DEBUG 2>&1 ; eend $? + eoutdent +else + DEBUG="/dev/null" +fi +} +# }}} + +# {{{ Check if we are in interactive startup mode +INTERACTIVE="" +stringinstring "BOOT_IMAGE=expert " "$CMDLINE" && INTERACTIVE="yes" +# }}} + +# {{{ set firmware timeout via bootparam +config_fwtimeout(){ + if checkbootparam fwtimeout ; then + TIMEOUT="$(getbootparam 'fwtimeout' 2>>$DEBUG)" + einfo "Bootoption fwtimeout found. (Re)Loading firmware_class module." + rmmod firmware_class 1>>$DEBUG 2>&1 + modprobe firmware_class ; eend $? + fi + if [ -z "$TIMEOUT" ] ; then + TIMEOUT="100" # linux kernel default: 10 + fi + if [ -f /sys/class/firmware/timeout ] ; then + einfo "Setting timeout for firmware loading to ${TIMEOUT}." + echo 100 > /sys/class/firmware/timeout ; eend $? + fi +} +# }}} + +### {{{ language configuration / localization +config_language(){ + + einfo "Activating language settings:" + eindent + + # people can specify $LANGUAGE and $CONSOLEFONT in a config file: + [ -r /etc/grml/autoconfig ] && . /etc/grml/autoconfig + + grep -q ' lang=.*-utf8' /proc/cmdline && UTF8='yes' || UTF8='' + + # check for bootoption which overrides config from /etc/grml/autoconfig: + BOOT_LANGUAGE="$(getbootparam lang 2>>$DEBUG)" + [ -n "$BOOT_LANGUAGE" ] && LANGUAGE="$BOOT_LANGUAGE" + + # set default to 'en' in live-cd mode if $LANGUAGE is not yet set: + if [ -z "$INSTALLED" ] ; then + [ -n "$LANGUAGE" ] || LANGUAGE='en' + fi + + # if bootoption lang is used update /etc/default/locale, otherwise *not*! + if [ -n "$BOOT_LANGUAGE" ] ; then + [ -x /usr/sbin/grml-setlang ] && /usr/sbin/grml-setlang "$LANGUAGE" + fi + + # set console font + if [ -z "$CONSOLEFONT" ] ; then + if ! checkbootparam "nodefaultfont" >>$DEBUG 2>&1 ; then + # [ -n "$UTF8" ] && CONSOLEFONT='LatArCyrHeb-16' || CONSOLEFONT='Lat15-Terminus16' + if [ -r /usr/share/consolefonts/Lat15-Terminus16.psf.gz ] ; then + CONSOLEFONT='Lat15-Terminus16' + else + ewarn "/usr/share/consolefonts/Lat15-Terminus16.psf.gz not available. Please upgrade package console-terminus." ; eend 1 + fi + fi + fi + + # export it now, so error messages get translated, too + if checkgrmlsmall ; then + export LANG='C' # grml-small does not provide any further locales + else + [ -r /etc/default/locale ] && . /etc/default/locale + export LANG LANGUAGE + fi + + # configure keyboard layout, read in already set values first: + [ -r /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard + + # now allow keyboard override by boot commandline for later use: + KKEYBOARD="$(getbootparam keyboard 2>>$DEBUG)" + [ -n "$KKEYBOARD" ] && KEYTABLE="$KKEYBOARD" + # notce: de/at is a bad choice, so take de-latin1-nodeadkeys instead: + [[ "$KKEYBOARD" == 'de' ]] && KEYTABLE=de-latin1-nodeadkeys + [[ "$KKEYBOARD" == 'at' ]] && KEYTABLE=de-latin1-nodeadkeys + + # modify /etc/sysconfig/keyboard only in live-cd mode: + if [ -z "$INSTALLED" ] ; then + + local LANGUAGE="$BOOT_LANGUAGE" + . /etc/grml/language-functions + # allow setting xkeyboard explicitly different than console keyboard + KXKEYBOARD="$(getbootparam xkeyboard 2>>$DEBUG)" + if [ -n "$KXKEYBOARD" ]; then + XKEYBOARD="$KXKEYBOARD" + KDEKEYBOARD="$KXKEYBOARD" + elif [ -n "$KKEYBOARD" ]; then + XKEYBOARD="$KKEYBOARD" + KDEKEYBOARD="$KKEYBOARD" + fi + + # duplicate of previous code to make sure /etc/grml/language-functions + # does not overwrite our values.... + # now allow keyboard override by boot commandline for later use: + KKEYBOARD="$(getbootparam keyboard 2>>$DEBUG)" + [ -n "$KKEYBOARD" ] && KEYTABLE="$KKEYBOARD" + # notce: de/at is a bad choice, so take de-latin1-nodeadkeys instead: + [[ "$KKEYBOARD" == 'de' ]] && KEYTABLE=de-latin1-nodeadkeys + [[ "$KKEYBOARD" == 'at' ]] && KEYTABLE=de-latin1-nodeadkeys + + # write keyboard related variables to file for later use + echo "KEYTABLE=\"$KEYTABLE\"" > /etc/sysconfig/keyboard + echo "XKEYBOARD=\"$XKEYBOARD\"" >> /etc/sysconfig/keyboard + echo "KDEKEYBOARD=\"$KDEKEYBOARD\"" >> /etc/sysconfig/keyboard + echo "KDEKEYBOARDS=\"$KDEKEYBOARDS\"" >> /etc/sysconfig/keyboard + fi + + [ -r /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard + + # Set default keyboard before interactive setup + if [ -n "$KEYTABLE" ] ; then + einfo "Running loadkeys for ${WHITE}${KEYTABLE}${NORMAL} in background" + loadkeys -q $KEYTABLE & + eend $? + fi + + if [ -n "$CONSOLEFONT" ] ; then + einfo "Running consolechars using ${CONSOLEFONT}" + consolechars -f $CONSOLEFONT || consolechars -d + eend $? + + if [ -n "$UTF8" ] ; then + einfo "Notice: run 'filterm - dynafont' in your shell to enable a unicode capable console." + fi + fi + + # we have to set up all consoles, therefore loop it over all ttys: + if [ -n "$CHARMAP" ] ; then + einfo "Running consolechars for ${CHARMAP}" + NUM_CONSOLES=`fgconsole --next-available` + NUM_CONSOLES=`expr ${NUM_CONSOLES} - 1` + [ ${NUM_CONSOLES} -eq 1 ] && NUM_CONSOLES=6 + for vc in `seq 0 ${NUM_CONSOLES}` ; do + consolechars --tty=/dev/tty${vc} -m ${CHARMAP} ; RC=$? + done + eend ${RC} + fi + + eoutdent +} +# }}} + +# {{{ Set hostname +config_hostname(){ + if checkbootparam hostname ; then + HOSTNAME="$(getbootparam 'hostname' 2>>$DEBUG)" + einfo "Setting hostname to $HOSTNAME as requested." + sed -i "s/^127.0.0.1.*localhost/127.0.0.1 $HOSTNAME localhost/" /etc/hosts + hostname $HOSTNAME ; eend $? + else + hostname --file /etc/hostname + fi +} +# }}} + +# fstabuser (needed when running from harddisk with username != grml {{{ +config_userfstab(){ + fstabuser=$(getent passwd 1000 | cut -d: -f1) + [ -n "$fstabuser" ] || fstabuser='grml' +} +# }}} + +# {{{ Set clock (Local time is more often used than GMT, so it is default) +config_time(){ + # don't touch the files if running from harddisk: + if [ -z "$INSTALLED" ]; then + UTC="" + checkbootparam utc >>$DEBUG 2>&1 && UTC="-u" + checkbootparam gmt >>$DEBUG 2>&1 && UTC="-u" + # hwclock uses the TZ variable + export TZ + hwclock $UTC -s + fi +} +# }}} + +# {{{ print kernel info +config_kernel(){ + vmware-detect &>/dev/null && VMWARE="inside ${WHITE}VMWare${NORMAL}" + einfo "Running Linux Kernel $KERNEL $VMWARE" ; eend 0 +} +# }}} + +# {{{ vmware specific stuff +config_vmware(){ +if checkbootparam novmware ; then + ewarn "Skipping running vmware specific stuff as requested on boot commandline." ; eend 0 +else + if [ -z "$INSTALLED" ]; then + if vmware-detect ; then + if [ -r /etc/X11/xorg.conf.vmware ] ; then + einfo "Copying /etc/X11/xorg.conf.vmware to /etc/X11/xorg.conf" + cp /etc/X11/xorg.conf.vmware /etc/X11/xorg.conf ; eend $? + fi + fi + fi +fi +} +# }}} + +# {{{ installed on hd? +config_checkfs(){ +if [ -n "$INSTALLED" ]; then + einfo "Running from HD, checking filesystems." +# We are running from HD, so a file system check is recommended + [ -f /etc/init.d/checkroot.sh ] && /etc/init.d/checkroot.sh + [ -f /etc/init.d/checkfs.sh ] && /etc/init.d/checkfs.sh + eend 0 +fi +} +# }}} + +# {{{ / must be read-write in any case, starting from here +config_remount_root(){ + mount -o remount,rw / 2>>$DEBUG +} +# }}} + +# {{{ ld.so.cache + depmod +config_ld_mod(){ +if [ -n "$INSTALLED" ]; then + if ! [ -r /etc/grml.first.boot ] ; then + einfo "Running from HD for the first time, regenerate ld.so.cache and modules.dep:" + eindent +# Regenerate ld.so.cache and module dependencies on HD + einfo "Running ldconfig" ; ldconfig ; eend $? + einfo "Running depmod" ; depmod -a ; eend $? + touch /etc/grml.first.boot + eend 0 + eoutdent + fi +fi +} +# }}} + +# update_progress {{{ +update_progress(){ + # be sure we are non-blocking + (echo "$1" > /etc/sysconfig/progress) & +} +# }}} + +# {{{ timezone +config_timezone(){ + # don't touch the files if running from harddisk: + if [ -z "$INSTALLED" ]; then + einfo "Setting timezone." + KTZ="$(getbootparam tz 2>>$DEBUG)" + [ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ" + rm -f /etc/localtime + cp "/usr/share/zoneinfo/$TZ" /etc/localtime && eend 0 + fi +} +# }}} + +# small computer / nearly no ram {{{ +config_small(){ + +RAM=$(/usr/bin/gawk '/MemTotal/{print $2}' /proc/meminfo) +# MEM=$(/usr/bin/gawk 'BEGIN{m=0};/MemFree|Cached|SwapFree/{m+=$2};END{print m}' /proc/meminfo) +eindent + +if checkbootparam "small"; then + einfo "Information: ${RAM} kB of RAM available." ; eend 0 + einfo "Bootoption small detected. Activating small system." + if [ -r /etc/inittab.small ] ; then + mv /etc/inittab /etc/inittab.normal + mv /etc/inittab.small /etc/inittab + else + sed -i 's/^9/#&/' /etc/inittab + sed -i 's/^10/#&/' /etc/inittab + sed -i 's/^11/#&/' /etc/inittab + sed -i 's/^12/#&/' /etc/inittab + fi + /sbin/telinit q ; eend $? +else + if checkgrmlsmall ; then + if [[ $RAM -lt 25000 ]] ; then + ewarn "Information: ${RAM} kB of RAM available." ; eend 1 + ewarn "At least 32MB of RAM should be available for grml-small." ; eend 1 + ewarn "Use the bootoption small to save some more MB of memory usage." ; eend 0 + ewarn "Dropping you into a rescue shell. To continue booting exit the shell." ; eend 0 + /bin/zsh --login + else + einfo "Information: ${RAM} kB of RAM available." ; eend 0 + fi + else + if [[ $RAM -lt 58000 ]] ; then + ewarn "Information: ${RAM} kB of RAM available." ; eend 1 + ewarn "At least 64MB of RAM should be available for grml." ; eend 1 + ewarn "Use the bootoption small to save some more MB of memory usage." ; eend 0 + ewarn "Dropping you into a rescue shell. To continue booting exit the shell." ; eend 0 + /bin/zsh --login + else + einfo "Information: ${RAM} kB of RAM available." ; eend 0 + fi + fi +fi +eoutdent +} +# }}} + +# skip startup of w3m {{{ +config_fast(){ +if checkbootparam "fast"; then + ewarn "Bootoption fast detected. Skipping startup of w3m." + sed -i 's#^1:.*#1:12345:respawn:/usr/bin/openvt -f -c 1 -w -- /bin/zsh#' /etc/inittab + /sbin/telinit q ; eend $? +fi +} +# }}} + +# activate serial console {{{ +config_console(){ +if checkbootparam "console"; then + einfo "Bootoption (for serial) console detected. Activating mgetty." + sed -i 's/^#T0/T0/' /etc/inittab + sed -i 's/^#T1/T1/' /etc/inittab + /sbin/telinit q ; eend $? +fi +} +# }}} + +# For burning on IDE-CD-Roms, k3b (and others) check for special permissions {{{ +config_cdrom_perm(){ +CDROMS="" +for DEVICE in /proc/ide/hd?; do + [ "$(cat $DEVICE/media 2>/dev/null)" = "cdrom" ] && CDROMS="$CDROMS /dev/${DEVICE##*/}" +done +[ -n "$CDROMS" ] && { chown root.cdrom $CDROMS; chmod 666 $CDROMS; } 2>/dev/null +} +# }}} + +# {{{ Bring up loopback interface now +config_local_net(){ + if [ -z "$INSTALLED" ] ; then + grep -q lo=lo /etc/network/run/ifstate 2>/dev/null || ifup lo + fi +} +# }}} + +# firewire devices {{{ +# the raw1394 driver does not yet export info into SYSFS, +# so let's create raw1394 device manually +# http://www.michael-prokop.at/blog/index.php?p=352 +config_firewire_dev(){ +if checkbootparam "nofirewiredev" ; then + ewarn "Skipping creating some firewire devices as requested on boot commandline." ; eend 0 +else +#if [ "${KERNEL%-*}" == "2.6.11" ] ; then + einfo "Creating some firewire devices (fix kernel 2.6-bug)." +# cd /dev && MAKEDEV video1394 raw1394 + [ -r /dev/raw1394 ] || mknod /dev/raw1394 c 171 0 + [ -r /dev/video1394 ] || mknod -m 666 /dev/video1394 c 171 16 +# mknod -m 666 /dev/dv1394 c 171 32 # for NTSC + [ -r /dev/dv1394 ] || mknod -m 666 /dev/dv1394 c 171 34 # for PAL + chown -R root:video /dev/raw1394 /dev/video1394 /dev/dv1394 + chmod -R 664 /dev/raw1394 /dev/video1394 /dev/dv1394 ; eend $? +fi +#fi +} +# }}} + +# {{{ copy passwd-lockfile to ramdisk (fix unionfs-behaviour) +# otherwise we will get: passwd: Authentication token lock busy +config_fix_passwd(){ + if [ -z "$INSTALLED" ] ; then + touch /etc/.pwd.lock + fi +} +# }}} + +# {{{ CD Checker +config_testcd(){ +if [ -n "$TESTCD" ]; then + einfo "Checking CD data integrity as requested by '${WHITE}testcd${NORMAL}' boot option." + einfo "Reading files and checking against GRML/md5sums, this may take a while..." + echo -n "${RED}" + ( cd /cdrom/GRML/ ; rm -f /tmp/md5sum.log ; md5sum -c md5sums 2>&1 | tee /tmp/md5sum.log ) + if [ "$?" = "0" ]; then + echo " ${GREEN}Everything looks OK${NORMAL}" + else + echo "${RED} *** CHECKSUM FAILED FOR THESE FILES: ***" + egrep -v '(^md5sum:|OK$)' /tmp/md5sum.log + echo "${RED} *** DATA ON YOUR CD MEDIUM IS POSSIBLY INCOMPLETE OR DAMAGED, ***${NORMAL}" + echo "${RED} *** OR YOUR COMPUTER HAS BAD RAM. ***${NORMAL}" + echo -n "${CYAN}Hit return to contine, or press the reset button to quit.${NORMAL} " + read a + fi + eend 0 +fi +} +# }}} + +# {{{ hardware detection via discover +config_discover(){ +if checkbootparam "nodisc" ; then + ewarn "Skipping hardware detection via discover as requested on boot commandline." ; eend 0 +else + if [ -x /sbin/discover ] ; then + einfo "Discovering hardware. Trying to load the following modules in background:" + eindent + einfo "$(discover --data-path=linux/module/name --data-path=linux/modules/options --format="%s %s" --data-version=`uname -r` --enable-bus all | sort -u | xargs echo)" + eoutdent + /sbin/discover-modprobe -v 1>>$DEBUG 2>&1 & + eend 0 + else + eerror "Application discover not available. Information: udev should handle hardware recognition." ; eend 0 + fi +fi +} +# }}} + +# {{{ hardware detection via hwinfo +config_hwinfo(){ +if checkbootparam hwinfo >>$DEBUG 2>&1; then + einfo "Discovering hardware via hwinfo:" + MODULES=$(su grml hwinfo | grep "Cmd: \"modprobe" | awk '{print $5}' | sed 's/"//') + echo -n " Loading modules: " + for i in `echo $MODULES` ; do echo -n $i && modprobe $i ; done + eend 0 +fi +} +# }}} + +# {{{ disable hotplug agents on request +config_hotplug_agent(){ +if checkbootparam "noagent" ; then + AGENT="$(getbootparam 'noagent' 2>>$DEBUG)" + AGENTLIST=$(echo "$AGENT" | sed 's/,/\\n/g') + AGENTNL=$(echo "$AGENT" | sed 's/,/ /g') + einfo "Disabling hotplug-agent(s) $AGENTNL" + for agent in $(echo -e $AGENTLIST) ; do + mv /etc/hotplug/${agent}.rc /etc/hotplug/${agent}.norc + done + [ "$?" == "0" ] ; eend $? +fi +} +# }}} + +# {{{ blacklist of hotplug-modules +config_hotplug_blacklist(){ +if checkbootparam "black" ; then + BLACK="$(getbootparam 'black' 2>>$DEBUG)" + BLACKLIST=$(echo "$BLACK" | sed 's/,/\\n/g') + BLACKNL=$(echo "$BLACK" | sed 's/,/ /g') + einfo "Blacklisting $BLACKNL via /etc/hotplug/blacklist.d/hotplug-light" + echo -e "$BLACKLIST" >> /etc/hotplug/blacklist.d/hotplug-light + echo -e "$BLACKLIST" >> /etc/hotplug/blacklist + eend 0 +fi +} +# }}} + +# {{{ run hotplug +config_hotplug(){ +if checkbootparam "nohotplug" ; then + ewarn "Skipping running hotplug as requested on boot commandline." ; eend 0 +else + if [ -r /etc/init.d/hotplug ] ; then + einfo "Starting hotplug system in background." + /etc/init.d/hotplug start 1>>$DEBUG 2>>$DEBUG & + eend 0 + elif [ -r /etc/init.d/hotplug-light ] ; then + einfo "Starting hotplug-light system in background." + /etc/init.d/hotplug-light start 1>>$DEBUG 2>>$DEBUG & + eend 0 + else + ewarn "No hotplug system found. Should be handled by udev. Skipping execution." ; eend 0 + fi +fi +} +# }}} + +# {{{ blacklist specific module +config_blacklist(){ +if checkbootparam "blacklist" ; then + if [ -z "$INSTALLED" ]; then + einfo "Bootoption blacklist found." + BLACK="$(getbootparam 'blacklist' 2>>$DEBUG)" + if [ -n "$BLACK" ] ; then + einfo "Blacklisting module ${BLACK} via /etc/modprobe.d/grml." + echo "# begin entry generated by config_blacklist of grml-autoconfig" >> /etc/modprobe.d/grml + echo "blacklist $BLACK" >> /etc/modprobe.d/grml + echo "alias $BLACK off" >> /etc/modprobe.d/grml + echo "# end entry generated by config_blacklist of grml-autoconfig" >> /etc/modprobe.d/grml ; eend $? + else + eerror "No given module for blacklist found. Blacklisting will not work therefor." + fi + else + ewarn "Backlisting via bootoption does not work on harddisk installations." ; eend 1 + eindent + einfo "Please blacklist the module(s) via /etc/modprobe.d/blacklist." + eoutdent + fi +fi +} +# }}} + +# {{{ ACPI +config_acpi_apm(){ +if [ -d /proc/acpi ]; then + if checkbootparam "noacpi"; then + ewarn "Skipping ACPI Bios detection as requested on boot commandline." ; eend 0 + else + einfo "ACPI Bios found, activating modules: " + eindent + found="" + for a in /lib/modules/$KERNEL/kernel/drivers/acpi/*; do + basename="${a##*/}" + basename="${basename%%.*}" + case "$basename" in *_acpi) + egrep -qi "${basename%%_acpi}" /proc/acpi/dsdt 2>>$DEBUG || continue ;; + esac + modprobe $basename >>$DEBUG 2>&1 && found="yes" + local BASE="$BASE $basename" + done + if [ -n "$found" ] ; then + einfo "$BASE" ; eend 0 + else + ewarn "(none)" ; eend 1 + fi + if ! [ -S /var/run/acpid.socket ] ; then + if ! [ -r /var/run/dbus/pid ] ; then + einfo "Starting acpi daemon." + /etc/init.d/acpid start >>$DEBUG ; eend $? + else + eerror "acpid error: it seems you are running d-bus/hal, but acpid needs to be started before d-bus." + eerror "Solution: please activate acpid via /etc/runlevel.conf" + eend 1 + fi + else + ewarn "acpi daemon already running." + eend 0 + fi + eoutdent + fi +else +# APM + if checkbootparam "noapm"; then + ewarn "Skipping APM Bios detection as requested on boot commandline." ; eend 0 + else + modprobe apm power_off=1 >>$DEBUG 2>&1 + if [ "$?" = "0" ] ; then + if [ -x /etc/init.d/apmd ] ;then + einfo "APM Bios found, enabling power management functions." + /etc/init.d/apmd start ; eend $? + fi + else + eerror "Loading apm module failed." ; eend 1 + fi + fi +fi +} +# }}} + +# {{{ PCMCIA Check/Setup +# This needs to be done before other modules are being loaded (by hwsetup) +config_pcmcia(){ +if checkbootparam "nopcmcia"; then + ewarn "Skipping PCMCIA detection as requested on boot commandline." ; eend 0 +else + if /usr/sbin/laptop-detect ; then + einfo "Detected Laptop - checking for PCMCIA." && eend 0 + modprobe pcmcia_core >>$DEBUG 2>&1 + # Try Cardbus or normal PCMCIA socket drivers + modprobe yenta_socket >>$DEBUG 2>&1 || modprobe i82365 >>$DEBUG 2>&1 || modprobe pd6729 >>$DEBUG 2>&1 || modprobe tcic >>$DEBUG 2>&1 + if [ "$?" = "0" ]; then + modprobe ds >>$DEBUG 2>&1 + if [ -d /proc/bus/pccard ] ; then + if [ -x /sbin/cardmgr ] ; then + einfo "PCMCIA found, starting cardmgr." + cardmgr >>$DEBUG 2>&1 && sleep 6 && eend 0 + else + eerror "No cardmgr found. Make sure package pcmciautils is installed, it should handle it instead." ; eend 1 + fi + fi + fi + fi +fi +} +# }}} + +# {{{ run software synthesizer via speakup +config_swspeak(){ +if checkbootparam swspeak ; then + if [ -d /proc/speakup/ ] ; then + einfo "Bootoption swspeak found. Kernel supports speakup." ; eend 0 + eindent + if [ -x /etc/init.d/speech-dispatcher ] ; then + einfo "Starting speech-dispatcher." + /etc/init.d/speech-dispatcher start 1>>DEBUG ; eend $? + einfo "Activating sftsyn in Kernel." + echo sftsyn >/proc/speakup/synth_name ; eend $? + einfo "Just run swspeak if you want to use software synthesizer via speakup." + flite -o play -t "Finished activating software speakup. Just run swspeak when booting finished." + else + eerror "speech-dispatcher not available. swspeak will not work without it." ; eend 1 + flite -o play -t "speech-dispatcher not available. speakup will not work without it." + fi + eoutdent + else + eerror "Kernel does not seem to support speakup. Skipping swspeak." ; eend 1 + flite -o play -t "Kernel does not seem to support speakup. Sorry." + fi +fi +} +# }}} + +# {{{ Check for blind option or brltty +config_blind(){ +BLIND="" +checkbootparam "blind" && BLIND="yes" +BRLTTY="$(getbootparam brltty 2>>$DEBUG)" + +if [ -n "$BLIND" -o -n "$BRLTTY" ]; then + if [ -x /sbin/brltty ]; then + # Blind option detected, start brltty now. + # modprobe serial_core parport_serial generic_serial && echo "done" + CMD=brltty + BRLTYPE="" + BRLDEV="" + BRLTEXT="" + if [ -n "$BRLTTY" ]; then + # Extra options + BRLTYPE="${BRLTTY%%,*}" + R="${BRLTTY#*,}" + if [ -n "$R" -a "$R" != "$BRLTTY" ]; then + BRLTTY="$R" + BRLDEV="${BRLTTY%%,*}" + R="${BRLTTY#*,}" + if [ -n "$R" -a "$R" != "$BRLTTY" ]; then + BRLTTY="$R" + BRLTEXT="${BRLTTY%%,*}" + R="${BRLTTY#*,}" + fi + fi + fi + [ -n "$BRLTYPE" ] && CMD="$CMD -b $BRLTYPE" + [ -n "$BRLDEV" ] && CMD="$CMD -d $BRLDEV" + [ -n "$BRLTEXT" ] && CMD="$CMD -t $BRLTEXT" + einfo "Starting braille-display manager." +# ( exec $CMD & ) + ( sh -c "$CMD" & ) + sleep 2 && BLINDSOUND="yes" + eend 0 + fi +fi +} +# }}} + +# {{{ Interactive configuration +config_interactive(){ +if [ -n "$INTERACTIVE" ] ; then +einfo "Entering interactive configuration second stage." + + echo " ${GREEN}Your console keyboard defaults to: ${MAGENTA}${KEYTABLE}" + echo -n "${CYAN}Do you want to (re)configure your console keyboard?${NORMAL} [Y/n] " + read a + [ "$a" != "n" ] && /usr/sbin/dpkg-reconfigure console-data ; eend $? + + echo -n "${CYAN}Do you want to (re)configure your soundcard?${NORMAL} [Y/n] " + read a + [ "$a" != "n" ] && alsaconf && ( exec aumix -m 0 >>$DEBUG 2>&1 & ) ; eend $? + + echo -n "${CYAN}Do you want to (re)configure your graphics (X11) subsystem?${NORMAL} [Y/n] " + read a + [ "$a" != "n" ] && xorgcfg -textmode ; eend $? + echo " ${GREEN}Interactive configuration finished. Everything else should be fine for now.${NORMAL}" +fi +eend 0 +} +# }}} + +# {{{ AGP +config_agp(){ +if checkbootparam forceagp ; then +# Probe for AGP. Hope this can fail safely + stringinfile "AGP" "/proc/pci" 2>>$DEBUG && { modprobe agpgart || modprobe agpgart agp_try_unsupported=1; } >>$DEBUG 2>&1 && einfo "AGP bridge detected." ; eend 0 +fi +} +# }}} + +# {{{ automount(er) +config_automounter(){ +if checkbootparam automounter ; then + RUNLEVEL="$(runlevel)" + AUTOMOUNTER="" + [ -x /etc/init.d/autofs ] && [ "$RUNLEVEL" != "N 1" ] && [ "$RUNLEVEL" != "N S" ] && AUTOMOUNTER="yes" + +addautomount(){ +# /dev/ice options + d="${1##*/}" + if [ -n "$AUTOMOUNTER" ]; then + [ -d "/mnt/$d" -a ! -L "/mnt/$d" ] && rmdir /mnt/$d + [ -d "/mnt/auto/$d" ] || mkdir -p "/mnt/auto/$d" + [ -L "/mnt/$d" ] || ln -s "/mnt/auto/$d" "/mnt/$d" + anew="$d -fstype=auto,$2 :$i" + stringinfile "$anew" "/etc/auto.mnt" || echo "$anew" >> /etc/auto.mnt + AUTOMOUNTS="$AUTOMOUNTS $d" + new="$1 /mnt/auto/$d auto users,noauto,exec,$2 0 0" + else + [ -d /mnt/$d ] && mkdir -p /mnt/$d + new="$1 /mnt/$d auto users,noauto,exec,$2 0 0" + fi + stringinfile "$new" "/etc/fstab" || echo "$new" >> /etc/fstab +} + + AUTOMOUNTS="floppy cdrom" +# Add new devices to /etc/fstab and /etc/auto.mnt + for i in /dev/cdrom?*; do + if [ -L $i ]; then + addautomount "$i" "ro" + fi + done +fi + +if [ -n "$AUTOMOUNTER" ]; then +# Check for floppy dir, reinstall with automounter + [ -d /mnt/floppy -a ! -L /mnt/floppy ] && rmdir /mnt/floppy + [ -d /mnt/auto/floppy ] || mkdir -p /mnt/auto/floppy + [ -L /mnt/floppy ] || ln -s /mnt/auto/floppy /mnt/floppy + [ -d /mnt/cdrom -a ! -L /mnt/cdrom ] && rmdir /mnt/cdrom + [ -d /mnt/auto/cdrom ] || mkdir -p /mnt/auto/cdrom + [ -L /mnt/cdrom ] || ln -s /mnt/auto/cdrom /mnt/cdrom + rm -f /etc/fstab.new +# Replace paths from bootfloppy + sed 's|/mnt/cdrom|/mnt/auto/cdrom|g;s|/mnt/floppy|/mnt/auto/floppy|g' /etc/fstab > /etc/fstab.new + mv -f /etc/fstab.new /etc/fstab +# Start automounter now + einfo "Starting automounter for ${AUTOMOUNTS}." + /etc/init.d/autofs start >>$DEBUG ; eend $? +fi +} +# }}} + +# {{{ Collect partitions from /proc/partitions first for enabling DMA +check_partitions(){ +partitions="" +IDEDISKS="" +while read major minor blocks partition relax; do + partition="${partition##*/}" + [ -z "$partition" -o ! -e "/dev/$partition" ] && continue + case "$partition" in + hd?) IDEDISKS="$IDEDISKS $partition";; # IDE Harddisk, entire disk + sd?) ;; # SCSI Harddisk, entire disk +# [hs]d*) partitions="$partitions /dev/$partition";; # IDE or SCSI disk partition + [hs]d*|ub*) partitions="$partitions /dev/$partition";; # IDE, USB or SCSI disk partition + esac +done </dev/null 2>&1 # avoid output "check_partitions:3: read-only file system" +# }}} + +# {{{ Enable DMA for all IDE drives now if not disabled +# Notice: Already done by linuxrc, maybe not on hd-installations +config_dma(){ +if checkbootparam "nodma"; then + ewarn "Skipping DMA accelleration as requested on boot commandline." ; eend 0 +else + for d in $(cd /proc/ide 2>>$DEBUG && echo hd[a-z]); do + if test -d /proc/ide/$d; then + if egrep -q 'using_dma[ \t]+0' /proc/ide/$d/settings 2>>$DEBUG; then + MODEL="$(cat /proc/ide/$d/model 2>>$DEBUG)" + test -z "$MODEL" && MODEL="[GENERIC IDE DEVICE]" + einfo "Enabling DMA acceleration for: ${WHITE}$d ${YELLOW}[${MODEL}]${NORMAL}" + echo "using_dma:1" >/proc/ide/$d/settings + eend 0 + fi + fi + done +fi +} +# }}} + +# {{{ Start creating /etc/fstab with HD partitions and USB SCSI devices now +config_fstab(){ +NOSWAP="" +checkbootparam "noswap" && NOSWAP="yes" +if checkbootparam "nofstab"; then + ewarn "Skipping /etc/fstab creation as requested on boot commandline." ; eend 0 +else + checkbootparam "anyswap" && export ANYSWAP='yes' || export ANYSWAP="" + einfo "Scanning for harddisk partitions and creating /etc/fstab. (Disable this via boot option: nofstab)" + iszsh && setopt nonomatch + if [ -x /usr/sbin/rebuildfstab ] ; then + config_userfstab || fstabuser=grml + /usr/sbin/rebuildfstab -r -u $fstabuser -g $fstabuser ; eend $? + else + ewarn "Command rebuildfstab not found. Install package grml-rebuildfstab." ; eend 1 + fi + if [ -e /var/run/rebuildfstab.pid ]; then + # Another instance of rebuildfstab, probably from hotplug, is still running, so just wait. + sleep 8 + fi +fi +# Scan for swap, config, homedir +if [ -z "$NOSWAP" -o -z "$INSTALLED" ]; then + einfo "Checking for swap partition(s)." +fi +GRML_IMG="" +GRML_SWP="" +HOMEDIR="$(getbootparam home)" +if [ -n "$partitions" ]; then + while read p m f relax; do + case "$p" in *fd0*|*proc*|*sys*|*\#*) continue;; esac + partoptions="users,exec" + fnew="" + case "$f" in swap) + eindent + if [ -n "$NOSWAP" ]; then + ewarn "Ignoring swap partition ${WHITE}$p${NORMAL} as requested." ; eend 0 + else + case "$(dd if=$p bs=1 count=6 skip=4086 2>/dev/null)" in + S1SUSP|S2SUSP|pmdisk|[zZ]*) + if [ -n "$ANYSWAP" ] ; then + einfo "Using swap partition ${WHITE}${p}${NORMAL} [bootoption anyswap found]." + swapon $p 2>>$DEBUG ; eend $? + else + ewarn "Suspend signature on ${WHITE}${p}${NORMAL} found, not using as swap. (Force usage via boot option: anyswap)" + fi + ;; + *) + if [[ "$p" == LABEL* ]] ; then + p=$(blkid -t $p | awk -F: '{print $1}') + fi + if grep -q $p /proc/swaps ; then + ewarn "Not using swap partition ${WHITE}${p}${NORMAL} as it is already in use." ; eend 0 + else + einfo "Using swap partition ${WHITE}${p}${NORMAL}." + swapon $p 2>>$DEBUG ; eend $? + fi + ;; + esac + fi + eoutdent + continue + ;; + esac +# Create mountdir if not already present, but don't try to create stuff like /proc/bus/usb +# Notice: grml-rebuildfstab >= 0.3-1 handles this now +# case "$m" in *none*|*proc*|*sys*|'') continue ;; esac +# [ -d "$m" ] || mkdir -p "$m" +# WARNING: NTFS RW mounts are only safe since Kernel 2.6.11 + [ "$f" = "ntfs" -a "${KERNEL%.*}" != "2.6" ] && continue + MOUNTOPTS="ro" + case "$f" in + vfat|msdos|ntfs) MOUNTOPTS="$MOUNTOPTS,uid=${fstabuser},gid=${fstabuser}" ;; + ext2|ext3|reiserfs|jfs|reiser4|xfs) MOUNTOPTS="$MOUNTOPTS,noatime" ;; + *) continue ;; + # *) NONEFOUND='1'; continue ;; + esac + mount -o "$MOUNTOPTS" -t $f $p $m 2>>$DEBUG || continue + # Activate swapfile, if exists + SWAPFILE="$(/bin/ls -1d $m/[Gg][Rr][Mm][Ll].[Ss][Ww][Pp] 2>/dev/null)" + if [ -z "$NOSWAP" -a -n "$SWAPFILE" -a -f "$SWAPFILE" ]; then + mount -o remount,rw $m + if swapon "$SWAPFILE" 2>>$DEBUG ; then + einfo "Using GRML swapfile ${SWAPFILE}." + fnew="$SWAPFILE swap swap defaults 0 0" + stringinfile "$fnew" "/etc/fstab" || echo "$fnew" >> /etc/fstab + GRML_SWP="$GRML_SWP $SWAPFILE" + eend 0 + fi + mount -o remount,ro $m 2>>$DEBUG + fi + IMAGE="$(/bin/ls -1d $m/[Gg][Rr][Mm][Ll].[Ii][Mm][Gg] 2>/dev/null)" + if [ -z "$INSTALLED" -a -z "$GRML_IMG" -a -n "$IMAGE" -a -f "$IMAGE" ]; then + if [ -n "$HOMEDIR" ]; then + if [ "$HOMEDIR" != "scan" -a "$HOMEDIR" != "$IMAGE" -a "$HOMEDIR" != "${IMAGE%/*.*}" ]; then + continue + fi + fi + if type -a grml-image >/dev/null 2>&1 && grml-image "$IMAGE" /dev/console 2>&1; then + GRML_IMG="$IMAGE" + mount -o remount,ro $m 2>>$DEBUG + fi + fi + eend 0 + # Umount, if not in use + umount -r $m 2>/dev/null + done <>$DEBUG 2>&1 + ( pump -i $DEVICE >>$DEBUG 2>&1 && echo finished_running_pump > /etc/network/status/$DEVICE ) & + trap "" 2 3 11 + sleep 1 + eend 0 + done +fi +} +# }}} + +# {{{ helper functions +findfile(){ +FOUND="" +# search all partitions for a file in the root directory +for i in /mnt/[sh]d[a-z] /mnt/[sh]d[a-z][1-9] /mnt/[sh]d[a-z][1-9]?*; do +# See if it's already mounted + [ -f "$i/$1" ] && { echo "$i/$1"; return 0; } + if [ -d "$i" ] && mount -r "$i" 2>>$DEBUG; then + [ -f "$i/$1" ] && FOUND="$i/$1" + umount -l "$i" 2>>$DEBUG + [ -n "$FOUND" ] && { echo "$FOUND"; return 0; } + fi +done +return 2 +} + +fstype(){ +case "$(file -s $1)" in + *[Ff][Aa][Tt]*|*[Xx]86*) echo "vfat"; return 0;; + *[Rr][Ee][Ii][Ss][Ee][Rr]*) echo "reiserfs"; return 0;; + *[Xx][Ff][Ss]*) echo "xfs"; return 0;; + *[Ee][Xx][Tt]3*) echo "ext3"; return 0;; + *[Ee][Xx][Tt]2*) echo "ext2"; return 0;; + *data*) echo "invalid"; return 0;; + *) echo "auto"; return 0;; +esac +} + +# Try to mount this filesystem read-only, without or with encryption +trymount(){ +# Check if already mounted +case "$(cat /proc/mounts)" in *\ $2\ *) return 0;; esac +# Apparently, mount-aes DOES autodetect AES loopback files. +[ -b "$1" ] && { mount -t auto -o ro "$1" "$2" 2>>$DEBUG; RC="$?"; } +# We need to mount crypto-loop files with initial rw support +[ -f "$1" ] && { mount -t auto -o loop,rw "$1" "$2" 2>>$DEBUG; RC="$?"; } +# Mount succeeded? +[ "$RC" = "0" ] && return 0 +echo "" +einfo "Filesystem not autodetected, trying to mount $1 with AES256 encryption." +a="y" +while [ "$a" != "n" -a "$a" != "N" ]; do +# We need to mount crypto-loop files with initial rw support + mount -t auto -o loop,rw,encryption=AES256 "$1" "$2" && return 0 + echo -n "${RED}Mount failed, retry? [Y/n] ${NORMAL}" + # Problem with ioctl() from getpasswd()? + # read a + read a +done +return 1 +} +# }}} + +# {{{ CPU-detection +config_cpu(){ +if checkbootparam "nocpu"; then + ewarn "Skipping CPU detection as requested on boot commandline." ; eend 0 +else + if ! [ -x /etc/init.d/powernowd ] ; then + ewarn "Skipping CPU detection as powernowd dependencies are not fulfilled." ; eend 1 + elif [ ! -e /lib/modules/${KERNEL}/kernel/arch/i386/kernel/cpu/cpufreq -o ! -e /lib/modules/${KERNEL}/kernel/drivers/cpufreq ] ; then + ewarn "Skipping CPU detection as module dependencies are not fulfilled." ; eend 1 + 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 + if /usr/sbin/laptop-detect ; then + einfo "Detected Laptop - trying to use cpu frequency scaling:" +# loadcpumod() { +# for module in /lib/modules/${KERNEL}/kernel/arch/i386/kernel/cpu/cpufreq/*.ko /lib/modules/${KERNEL}/kernel/drivers/cpufreq/*.ko ; do +# # modprobe ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l | grep cpufreq 2>>$DEBUG)"}:#}##*/}%.*} +# modprobe `basename ${module%%\.ko}` 1>>$DEBUG 2>&1 +# done +# } +# CPU=$(grep 'model name' /proc/cpuinfo | cut -b14- | head -1) +# eindent +# if [[ $CPU = *Intel* ]] ; then +# einfo "Detected CPU is of type Intel - loading modules and starting cpudyn." +# local DETECTED=1 +# loadcpumod +# /etc/init.d/cpudyn start 1>>$DEBUG ; eend $? +# fi +# if [[ $CPU = *AMD* ]] ; then +# einfo "Detected CPU is of type AMD - loading modules and starting powernowd." +# local DETECTED=1 +# loadcpumod +# /etc/init.d/powernowd start 1>>$DEBUG ; eend $? +# fi + + eindent + if [ -r /usr/bin/cpufreq-detect.sh ] ; then + . /usr/bin/cpufreq-detect.sh + if [ -n "$MODULE" -a "$MODULE" != none ]; then + einfo "Loading module ${MODULE} and starting powernowd." + modprobe cpufreq_userspace 1>>$DEBUG + modprobe "$MODULE" 1>>$DEBUG || modprobe "$MODULE_FALLBACK" 1>>$DEBUG + /etc/init.d/powernowd start 1>>$DEBUG ; eend $? + else + ewarn "Could not detect an appropriate CPU for use with powernowd - skipping." && eend 1 + fi + fi + eoutdent + fi + fi +fi +} +# }}} + +# {{{ autostart of ssh +config_ssh(){ +if checkbootparam ssh ; then + SSH_PASSWD="$(getbootparam 'ssh' 2>>$DEBUG)" + einfo "Bootoption passwd found." + if [ -n "$SSH_PASSWD" ] ; then + echo "grml:$SSH_PASSWD" | chpasswd -m + einfo "Starting secure shell server in background." + /etc/init.d/rmnologin start 1>>$DEBUG 2>>$DEBUG + /etc/init.d/ssh start 1>>$DEBUG 2>>$DEBUG & + eend 0 + else + eerror "No given password for ssh found. Autostart of SSH will not work." ; eend 1 + fi + eindent + ewarn "Warning: please change the password for user grml set via bootparameter as soon as possible!" + eoutdent +fi +} +# }}} + +# {{{ set password for user grml +config_passwd(){ +if checkbootparam passwd >>$DEBUG 2>&1; then + einfo "Bootoption passwd found." + PASSWD="$(getbootparam 'passwd' 2>>$DEBUG)" + if [ -n "$PASSWD" ] ; then + echo "grml:$PASSWD" | chpasswd -m ; eend $? + else + eerror "No given password for ssh found. Autostart of SSH will not work." ; eend 1 + fi + eindent + ewarn "Warning: please change the password for user grml set via bootparameter as soon as possible!" + eoutdent +fi +} +# }}} + +# {{{ Check for persistent homedir option and eventually mount /home from there, or use a loopback file. +config_homedir(){ +HOMEDIR="$(getbootparam home)" +MYHOMEDEVICE="" +MYHOMEMOUNTPOINT="" +MYHOMEDIR="" +if [ -n "$HOMEDIR" ]; then + einfo "Bootoption home detected." && eend 0 + case "$HOMEDIR" in + /dev/*) + MYHOMEDEVICE="${HOMEDIR##/dev/}" + MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}" + MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}" + MYHOMEDIR="/mnt/${HOMEDIR##/dev/}" + ;; + /mnt/*) + MYHOMEDEVICE="${HOMEDIR##/mnt/}" + MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}" + MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}" + MYHOMEDIR="$HOMEDIR" + ;; + [Aa][Uu][Tt][Oo]|[Ss][Cc][Aa][Nn]|[Ff][Ii][Nn][Dd]) + MYHOMEDIR="$(findfile grml.img)" + MYHOMEDEVICE="${MYHOMEDIR##/mnt/}" + MYHOMEDEVICE="/dev/${MYHOMEDEVICE%%/*}" + MYHOMEMOUNTPOINT="/mnt/${MYHOMEDEVICE##/dev/}" + ;; + *) + eerror "Invalid home= option '$HOMEDIR' specified (must start with /dev/ or /mnt/ or 'scan')." ; eend 1 + eerror "Option ignored." ; eend 1 + ;; + esac +fi + +if [ -n "$MYHOMEDIR" ]; then + if trymount "$MYHOMEDEVICE" "$MYHOMEMOUNTPOINT"; then + [ -f "$MYHOMEMOUNTPOINT/grml.img" ] && MYHOMEDIR="$MYHOMEMOUNTPOINT/grml.img" + while read device mountpoint fs relax; do + case "$mountpoint" in *$MYHOMEMOUNTPOINT*) + case "$fs" in *[Nn][Tt][Ff][Ss]*) + umount "$MYHOMEMOUNTPOINT"; eerror "Error: will not mount NTFS filesystem on $MYHOMEDEVICE read/write!" ; eend 1 + break + ;; + *[Ff][Aa][Tt]*) + # Note: This currently won't work with encrypted partitions + umount "$MYHOMEMOUNTPOINT"; mount -t vfat -o rw,uid=grml,gid=grml,umask=002 "$MYHOMEDEVICE" "$MYHOMEMOUNTPOINT" + if [ ! -f "$MYHOMEDIR" ]; then + ewarn "WARNING: FAT32 is not a good filesystem option for /home/grml (missing socket/symlink support)." + ewarn "WARNING: Better use an ext2 loopback file on this device, and boot with home=$MYHOMEDEVICE/grml.img." + fi + ;; + esac + if mount -o remount,rw "$MYHOMEMOUNTPOINT"; then + einfo "Mounting ${WHITE}$MYHOMEDIR${NORMAL} as ${WHITE}/home/grml${NORMAL}." + if [ -f "$MYHOMEDIR" ]; then + # It's a loopback file, mount it over the /home/grml directory + trymount "$MYHOMEDIR" /home/grml + RC="$?" + [ "$RC" = "0" ] && ERROR="$(mount -o remount,rw /home/grml 2>&1)" + RC="$?" + else + # Do a --bind mount + ERROR="$(mount --bind "$MYHOMEDIR" /home/grml 2>&1)" + RC="$?" + fi + [ "$RC" = "0" ] && eend 0 || ( eerror "${ERROR}" ; eend 1 ) + fi + break + ;; + esac + done < /proc/sys/kernel/printk + . "$MYCONFIG" "$MYCONFDIR" || true + echo "0" > /proc/sys/kernel/printk + fi + umount "$MYCONFMOUNTPOINT" 2>>$DEBUG + fi + fi + [ -n "$FOUND_CONFIG" ] || eerror "Not present." + eoutdent +fi +# }}} + +# {{{ Check for extra shellscript on CD-ROM (/cdrom/GRML/grml.sh) +MYCONFIG="$(/bin/ls -1d /cdrom/GRML/[Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)" +if [ -n "$MYCONFIG" -a -f "$MYCONFIG" ]; then + echo "" + FOUND_CONFIG="yes" + einfo "grml script/configuration file found on CD, executing ${BLUE}${MYCONFIG}${NORMAL}:" + echo "6" > /proc/sys/kernel/printk + . "$MYCONFIG" /cdrom/GRML || true + echo "0" > /proc/sys/kernel/printk +fi +} +# }}} + +# {{{ Check for scripts on CD-ROM +config_cdrom_scripts(){ +if checkbootparam "script"; then + for script in /cdrom/scripts/* ; do + einfo " grml script found on CD, executing ${WHITE}${script}${NORMAL}." + . $script + done +fi +} +# }}} + +# {{{ Sound +config_mixer(){ +if ! [ -x /usr/bin/aumix ] ; then + eerror "aumix binary not available. Can not set sound volumes therefore." ; eend 1 +else + + if checkbootparam vol ; then + VOL="$(getbootparam 'vol' 2>>$DEBUG)" + if [ -z "$VOL" ] ; then + eerror "Bootoption vol found but no volume level/parameter given. Using defaults." ; eend 1 + VOL='75' # default + fi + else + VOL='75' # default + fi + + if checkbootparam nosound ; then + einfo "Muting sound devices on request." + # some IBM notebooks require the following stuff: + if [ -x /usr/bin/amixer ] ; then + if amixer get Front 1>/dev/null 2>>$DEBUG ; then + amixer set Front unmute 1>/dev/null + amixer set Front 0% 1>/dev/null + fi + fi + aumix -w 0 -v 0 -p 0 -m 0 ; eend $? + elif [ -z "$INSTALLED" ]; then + einfo "Setting mixer volumes to level ${WHITE}${VOL}${NORMAL}." + # some IBM notebooks require the following stuff: + if [ -x /usr/bin/amixer ] ; then + if amixer get Front 1>/dev/null 2>>$DEBUG ; then + amixer set Front unmute 1>/dev/null + amixer set Front ${VOL}% 1>/dev/null + fi + fi + aumix -w $VOL -v $VOL -p $VOL -m $VOL ; eend $? + fi + +fi +} +# }}} + +# {{{ modem detection +config_modem(){ +if checkbootparam "nomodem"; then + ewarn "Skipping check for AC97 modem controller as requested on boot commandline." ; eend 0 +else + if [ -x /etc/init.d/sl-modem-daemon ] ; then + if lspci | grep Intel | grep -q "AC'97 Modem Controller" ; then + einfo "AC97 modem controller detected. Starting sl-modem-daemon in background." + /etc/init.d/sl-modem-daemon start >>$DEBUG & + eend 0 + fi + fi +fi +} +# }}} + +# {{{ keyboard add-ons +config_setkeycodes(){ +if checkbootparam "setkeycodes" ; then + einfo "Setting keycodes as requested via bootparameter 'setkeycodes'." + # MS MM keyboard add-on + # fix + setkeycodes e001 126 &>/dev/null + setkeycodes e059 127 &>/dev/null + # fn keys + setkeycodes e03b 59 &>/dev/null + setkeycodes e008 60 &>/dev/null + setkeycodes e007 61 &>/dev/null + setkeycodes e03e 62 &>/dev/null + setkeycodes e03f 63 &>/dev/null + setkeycodes e040 64 &>/dev/null + setkeycodes e041 65 &>/dev/null + setkeycodes e042 66 &>/dev/null + setkeycodes e043 67 &>/dev/null + setkeycodes e023 68 &>/dev/null + setkeycodes e057 87 &>/dev/null + setkeycodes e058 88 &>/dev/null + # hp keycodes + setkeycodes e00a 89 e008 90 &>/dev/null + eend 0 +fi +} +# }}} + +# {{{ wondershaper +config_wondershaper(){ + if checkbootparam "wondershaper" ; then + WONDER="$(getbootparam wondershaper 2>>$DEBUG)" + CMD=wondershaper + DEVICE="" + DOWNSTREAM="" + UPSTREAM="" + if [ -n "$WONDER" ]; then + # Extra options + DEVICE="${WONDER%%,*}" + R="${WONDER#*,}" + if [ -n "$R" -a "$R" != "$WONDER" ]; then + WONDER="$R" + DOWNSTREAM="${WONDER%%,*}" + R="${WONDER#*,}" + if [ -n "$R" -a "$R" != "$WONDER" ]; then + WONDER="$R" + UPSTREAM="${WONDER%%,*}" + R="${WONDER#*,}" + fi + fi + fi + [ -n "$DEVICE" ] && CMD="$CMD $DEVICE" + [ -n "$DOWNSTREAM" ] && CMD="$CMD $DOWNSTREAM" + [ -n "$UPSTREAM" ] && CMD="$CMD $UPSTREAM" + einfo "Starting wondershaper (${CMD}) in background." + ( sh -c $CMD & ) && eend 0 + fi +} +# }}} + +# {{{ syslog-ng +config_syslog(){ + if checkbootparam "nosyslog"; then + ewarn "Not starting syslog-ng as requested on boot commandline." ; eend 0 + else + einfo "Starting syslog-ng in background." + /etc/init.d/syslog-ng start 1>>$DEBUG & + eend 0 + fi +} +# }}} + +# {{{ gpm +config_gpm(){ + if checkbootparam "nogpm"; then + ewarn "Not starting GPM as requested on boot commandline." ; eend 0 + else + einfo "Starting gpm in background." +# /etc/init.d/gpm start 1>>$DEBUG & + ( while [ ! -e /dev/psaux ]; do sleep 5; done; /etc/init.d/gpm start 1>>$DEBUG ) & + eend 0 + fi +} +# }}} + +# {{{ services +config_services(){ + if checkbootparam "services" ; then + SERVICE="$(getbootparam services 2>>$DEBUG)" + SERVICELIST=$(echo "$SERVICE" | sed 's/,/\\n/g') + SERVICENL=$(echo "$SERVICE" | sed 's/,/ /g') + einfo "Starting service(s) ${SERVICENL} in background." + for service in $(echo -e $SERVICELIST) ; do + /etc/init.d/${service} start 1>>$DEBUG & + done + [ "$?" == "0" ] ; eend $? + fi +} +# }}} + +# {{{ config files +config_netconfig(){ + if checkbootparam netconfig ; then + CONFIG="$(getbootparam 'netconfig' 2>>$DEBUG)" + CONFIGFILE='/tmp/netconfig.grml' + + getconfig() { + wget --timeout=10 --dns-timeout=10 --connect-timeout=10 \ + --read-timeout=10 $CONFIG -O $CONFIGFILE && return 0 || return 1 + } + einfo "Trying to get ${WHITE}${CONFIG}${NORMAL}" + counter=10 + while ! getconfig && [[ "$counter" != 0 ]] ; do + echo -n "Sleeping for 5 seconds and trying to get config again... " + counter=$(( counter-1 )) + echo "$counter tries left" ; sleep 1 + done + if [ -r "$CONFIGFILE" ] ; then + einfo "Downloading was successfull." ; eend 0 + einfo "md5sum of ${WHITE}${CONFIG}${NORMAL}: " + md5sum $CONFIGFILE ; eend 0 + cd / && einfo "Unpacking ${WHITE}${CONFIGFILE}${NORMAL}:" && /usr/bin/unp $CONFIGFILE $EXTRACTOPTIONS ; eend $? + else + einfo "Sorry, could not fetch $CONFIG" ; eend 1 + fi + fi +} +# }}} + +# {{{ blindsound +config_blindsound(){ + if checkbootparam "blind" ; then + beep + flite -o play -t "welcome to the gremel system" + fi +} +# }}} + +# {{{ welcome sound +config_welcome(){ + if checkbootparam welcome ; then + flite -o play -t "welcome to the gremel system" + fi +} +# }}} + +# {{{ fix/workaround for unionfs +fix_unionfs(){ + if [ -z "$INSTALLED" ]; then + touch /var/cache/apt/*cache.bin + fi +} +# }}} + +# {{{ create all /mnt-directories +create_mnt_dirs(){ + ewarn "create_mnt_dirs is deprecated as grml-rebuildfstab does all we need." + ewarn "Please set CONFIG_CREATE_MNT_DIRS='no' in /etc/grml/autoconfig" ; eend 0 +} +# }}} + +# {{{ start X window system via grml-x +config_x_startup(){ +if checkbootparam startx ; then + if [ -x /usr/X11R6/bin/X ] ; then + if [ -z "$INSTALLED" ] ; then + WINDOWMANAGER="$(getbootparam 'startx' 2>>$DEBUG)" + if [ -z "$WINDOWMANAGER" ] ; then + einfo "No window manager specified. Taking ${WHITE}wm-ng${NORMAL} as default." && eend 0 + WINDOWMANAGER="wm-ng" + else + einfo "Window manager ${WHITE}${WINDOWMANAGER}${NORMAL} found as bootoption." && eend 0 + fi + einfo "Changing to runlevel 5 for starting grml-x ${WINDOWMANAGER}. Just exit X windows system to get full featured consoles." + config_userfstab || fstabuser='grml' + cat>|/etc/init.d/xstartup<>$DEBUG +EOF + chmod 755 /etc/init.d/xstartup + sed -i 's/^allowed_users=.*/allowed_users=anybody/' /etc/X11/Xwrapper.config + sed -i 's#^6.*#6:2345:respawn:/bin/zsh --login -c "/etc/init.d/xstartup ; /bin/zsh"#' /etc/inittab + /sbin/telinit q ; eend $? + else + eerror "We are not running from CD - startx will not work, skipping it. + 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. + Boot parameter startx does not work therefore." ; eend 1 + fi +fi +} +# }}} + +# {{{ configuration framework +config_extract(){ +if checkbootparam extract ; then + EXTRACT="$(getbootparam 'extract' 2>>$DEBUG)" + EXTRACTOPTIONS="-- -x $EXTRACT" +fi +} + +config_automount(){ +if checkbootparam noautoconfig ; then + ewarn "Skipping running automount of device(s) labeled GRMLCFG as requested." ; eend 0 +else + if [ -z "$INSTALLED" ] ; then + einfo "Searching for device(s) labeled with GRMLCFG." ; eend 0 + eindent + [ -d /mnt/grml ] || mkdir /mnt/grml + umount /mnt/grml 1>>$DEBUG 2>&1 # make sure it is not mounted +# We do need the following fix so floppy disk is available to blkid in any case :-/ + if [ -r /dev/fd0 ] ; then + einfo "Floppy device detected. Trying to access floppy disk. (Disable this via boot option: noautoconfig)" +# dd if=/dev/fd0 of=/dev/null bs=512 count=1 1>>$DEBUG 2>&1 + if timeout 4 dd if=/dev/fd0 of=/dev/null bs=512 count=1 1>>$DEBUG 2>&1 ; then + blkid /dev/fd0 1>>$DEBUG 2>&1 + fi + fi + DEVICE=$(blkid -t LABEL=GRMLCFG | head -1 | awk -F: '{print $1}') + [ -n "$DEVICE" ] && mount -t auto -o ro $DEVICE /mnt/grml ; RC="$?" + if [[ $RC == 0 ]]; then + einfo "Mounting device $DEVICE labeled GRMLCFG succeeded." ; eend 0 + + CONFIG='' + CONFIG="$(/bin/ls -1d /mnt/grml/[Cc][Oo][Nn][Ff][Ii][Gg].[Tt][Bb][Zz] 2>>$DEBUG)" + if [ -n "$CONFIG" ]; then + einfo "Found file ${WHITE}${CONFIG}${NORMAL} - trying to extract it." + cd / + unp $CONFIG $EXTRACTOPTIONS ; eend $? + else + ewarn "Sorry, could not find file config.tbz on device with label GRMLCFG." ; eend 1 + fi + + SCRIPT='' + SCRIPT="$(/bin/ls -1d /mnt/grml/[Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)" + if [ -n "$SCRIPT" ]; then + einfo "Found script ${WHITE}${SCRIPT}${NORMAL} - trying to execute it." + $SCRIPT ; eend $? + fi + grep -q '/mnt/grml' /proc/mounts && umount /mnt/grml + else + ewarn "No devices with label GRMLCFG found." ; eend 0 + fi + eoutdent + fi +fi +} + +config_myconfig(){ +if checkbootparam myconfig ; then + MOUNTDEVICE="$(getbootparam 'myconfig' 2>>$DEBUG)" + if [ -n "$MOUNTDEVICE" ]; then + if checkbootparam file ; then + FILENAME="$(getbootparam 'file' 2>>$DEBUG)" + [ -n "$FILENAME" ] || FILENAME='config.tbz' + fi + [ -d /mnt/grml ] || mkdir /mnt/grml + umount /mnt/grml 1>>$DEBUG 2>&1 # make sure it is not mounted + mount -o ro -t auto $MOUNTDEVICE /mnt/grml ; RC="$?" + if [[ $RC == 0 ]]; then + einfo "Successfully mounted $MOUNTDEVICE to /mnt/grml (readonly)." ; eend 0 + eindent + CONFIG='' + CONFIG="$(/bin/ls -1d /mnt/grml/[Cc][Oo][Nn][Ff][Ii][Gg].[Tt][Bb][Zz] 2>>$DEBUG)" + if [ -n "$CONFIG" ]; then + einfo "Found file ${WHITE}${CONFIG}${NORMAL} - trying to extract it." + cd / + unp $CONFIG $EXTRACTOPTIONS ; eend $? + else + ewarn "Sorry, could not find file config.tbz on device with label GRMLCFG." ; eend 1 + fi + + SCRIPT='' + SCRIPT="$(/bin/ls -1d /mnt/grml/[Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)" + if [ -n "$SCRIPT" ]; then + einfo "Found script ${WHITE}${SCRIPT}${NORMAL} - trying to execute it." + $SCRIPT ; eend $? + fi + eoutdent + else + einfo "Could not mount $MOUNTDEVICE to /mnt/grml - sorry." ; eend 1 + fi # mount $MOUNTDEVICE + grep -q '/mnt/grml' /proc/mounts && umount /mnt/grml + else + einfo "Sorry, no device for bootoption myconfig provided. Skipping." ; eend 1 + fi # [ -n "$MOUNTDEVICE" ] +fi # checkbootparam myconfig + +if checkbootparam "partconf" ; then + MOUNTDEVICE="$(getbootparam 'partconf' 2>>$DEBUG)" + if [ -n "$MOUNTDEVICE" ]; then + [ -d /mnt/grml ] || mkdir /mnt/grml + mount -o ro -t auto $MOUNTDEVICE /mnt/grml ; RC="$?" + if [[ $RC == 0 ]]; then + einfo "Successfully mounted $MOUNTDEVICE to /mnt/grml (readonly)." ; eend 0 + einfo "Copying files from $MOUNTDEVICE over grml system." + for file in `cat /etc/grml/partconf` ; do + [ -d /mnt/grml/$file ] && cp -a /mnt/grml/${file}* ${file} && echo "copied: $file" + [ -f /mnt/grml/$file ] && cp -a /mnt/grml/${file} ${file} && echo "copied: $file" + done && eend 0 + else + einfo "Could not mount $MOUNTDEVICE to /mnt/grml - sorry." ; eend 1 + fi # mount $MOUNTDEVICE + grep -q '/mnt/grml' /proc/mounts && umount /mnt/grml + else + einfo "Sorry, no device for bootoption partconf provided. Skipping." ; eend 1 + fi # [ -n "$MOUNTDEVICE" ] +fi +} +# }}} + +# {{{ /cdrom/.*-options +config_debs(){ +if checkbootparam "debs" ; then + DEBS="$(getbootparam 'debs' 2>>$DEBUG)" + [ -z "$CONFIG" ] && CONFIG="/cdrom/debs/*" + einfo "Tring to install debian package(s) ${DEBS}:" + dpkg -i /cdrom/debs/$DEBS* ; eend $? +fi +} + +config_config(){ +if checkbootparam "config" ; then + CONFIG="$(getbootparam 'config' 2>>$DEBUG)" + [ -z "$CONFIG" ] && CONFIG='config.tbz' + einfo "Bootoption config found. config is set to: $CONFIG" + eindent + einfo "Trying to extract configuration file ${CONFIG}:" + cd / && unp /cdrom/config/$CONFIG $EXTRACTOPTIONS ; eend $? + eoutdent +fi +} + +config_scripts(){ +if checkbootparam "scripts" ; then + SCRIPTS="$(getbootparam 'scripts' 2>>$DEBUG)" + [ -z "$SCRIPTS" ] && SCRIPTS='grml.sh' + einfo "Bootparameter scripts found. Trying to execute ${SCRIPTS}:" + sh -c /cdrom/scripts/$SCRIPTS ; eend $? +fi +} +# }}} + +# {{{ distcc +config_distcc(){ +if checkbootparam "distcc" ; then + OPTIONS="$(getbootparam distcc 2>>$DEBUG)" + if [ -n "$OPTIONS" ]; then + NET="" + INTERFACE="" + if [ -n "$OPTIONS" ]; then + NET="${OPTIONS%%,*}" + R="${OPTIONS#*,}" + if [ -n "$R" -a "$R" != "$OPTIONS" ]; then + OPTIONS="$R" + INTERFACE="${OPTIONS%%,*}" + R="${OPTIONS#*,}" + fi + fi + fi + CONFIG=/etc/default/distcc + sed -i "s#^STARTDISTCC=.*#STARTDISTCC=YES#" $CONFIG + sed -i "s#^ALLOWEDNETS=.*#ALLOWEDNETS=$NET#" $CONFIG + + if [ -n "$INTERFACE" ] ; then + IP=$(LANG=C ifconfig $INTERFACE | gawk -F: /"inet addr"/'{print $2}' | gawk '{print $1}') + + counter=10 + while [ -z "$IP" ] && [[ "$counter" != 0 ]] ; do + counter=$(( counter-1 )) + ewarn "No ip address for $INTERFACE found. Sleeping for 3 seconds. $counter tries left." + sleep 3 + IP=$(LANG=C ifconfig $INTERFACE | gawk -F: /"inet addr"/'{print $2}' | gawk '{print $1}') + done + fi + + if [ -n "$IP" ] ; then + sed -i "s#^LISTENER=.*#LISTENER=$IP#" $CONFIG + + einfo "Bootoption distcc found. Preparing setup for distcc daemon." + eindent + id distccd >/dev/null 2>&1 || \ + ( + einfo "Creating distcc user" ; \ + adduser --quiet --system --ingroup nogroup --home / --no-create-home distccd ; eend $? + ) + + einfo "Starting distcc for network ${NET}, listening on ${IP}." + /etc/init.d/distcc start 1>/dev/null ; eend $? + eoutdent + else + eerror "No ip address for $INTERFACE found. distcc can not be used without it." ; eend 1 + fi +fi + +if checkbootparam "gcc"; then + GCC="$(getbootparam gcc 2>>$DEBUG)" + eindent + einfo "Pointing /usr/bin/gcc to /usr/bin/gcc-${GCC}." + eoutdent + rm -f /usr/bin/gcc + ln -s /usr/bin/gcc-${GCC} /usr/bin/gcc ; eend $? +fi + +if checkbootparam "gpp"; then + GPP="$(getbootparam gpp 2>>$DEBUG)" + eindent + einfo "Pointing /usr/bin/g++ to /usr/bin/g++-${GPP}." + if [ -x /usr/bin/g++-${GPP} ] ; then + rm -f /usr/bin/g++ + ln -s /usr/bin/g++-${GPP} /usr/bin/g++ ; eend $? + fi + einfo "Pointing /usr/bin/cpp to /usr/bin/cpp-${GPP}." + if [ -x /usr/bin/cpp-${GPP} ] ; then + rm -f /usr/bin/cpp + ln -s /usr/bin/cpp-${GPP} /usr/bin/cpp ; eend $? + fi + eoutdent +fi + +} +# }}} + +# {{{ load modules +# Notice: use it only on live-cd system, if running from harddisk please +# add modules to /etc/modules and activate /etc/init.d/module-init-tools +# in /etc/runlevel.conf +config_modules(){ +MODULES_FILE=/etc/grml/modules +if checkbootparam nomodules ; then + ewarn "Skipping loading of modules defined in ${MODULES_FILE} as requested." ; eend 0 +elif [ -z "$INSTALLED" ]; then + if [ -r $MODULES_FILE ] ; then + einfo "Loading modules specified in ${MODULES_FILE}:" + eindent + grep '^[^#]' $MODULES_FILE | \ + while read module args; do + [ "$module" ] || continue + einfo "${module}" + modprobe $module $args ; eend $? + done + eoutdent + else + ewarn "File $MODULES_FILE does not exist. Skipping loading of specific modules." ; eend 1 + fi +fi +} +# }}} + +# {{{ 915resolution +config_915resolution(){ +if checkbootparam "915resolution" ; then + OPTIONS="$(getbootparam 915resolution 2>>$DEBUG)" + if [ -x /usr/sbin/915resolution ]; then + CMD=915resolution + MODE="" + XRESO="" + YRESO="" + if [ -n "$OPTIONS" ]; then + # Extra options + MODE="${OPTIONS%%,*}" + R="${OPTIONS#*,}" + if [ -n "$R" -a "$R" != "$OPTIONS" ]; then + OPTIONS="$R" + XRESO="${OPTIONS%%,*}" + R="${OPTIONS#*,}" + if [ -n "$R" -a "$R" != "$OPTIONS" ]; then + OPTIONS="$R" + YRESO="${OPTIONS%%,*}" + R="${OPTIONS#*,}" + fi + fi + fi + einfo "Running 915resolution with options ${MODE} ${XRESO} ${YRESO}." + [ -n "$MODE" ] && [ -n "$XRESO" ] && [ -n "$YRESO" ] && ( sh -c "$CMD $MODE $XRESO $YRESO" & ) + eend 0 + fi +fi +} +# }}} + +# {{{ debnet: setup network based on an existing one found on a partition +config_debnet(){ +if checkbootparam "debnet" ; then + iszsh && setopt shwordsplit + DEVICES="$(< /proc/partitions tail -n +3 | awk '{print "/dev/"$4}' | tr "\n" " ")" + DEVICES="$DEVICES $(ls /dev/mapper/*)" + FOUND_DEBNET="" + + einfo "Bootoption 'debnet' found. Searching for Debian network configuration: " + eindent + if ! mount | grep '/mnt ' 1>/dev/null 2>&1 ; then + for i in $DEVICES; do + if mount -o ro -t auto "$i" /mnt >/dev/null 2>&1; then + einfo "Scanning on $i" + if [ -f /mnt/etc/network/interfaces ]; then + einfo "/etc/network/interfaces found on ${i}" ; eend 0 + FOUND_DEBNET="$i" + break + fi + umount /mnt + fi + done + + if [ -n "$FOUND_DEBNET" ]; then + einfo "Stopping network." + pump -k 1>/dev/null 2>&1 + /etc/init.d/networking stop 1>/dev/null 2>&1 ; eend $? + einfo "Copying Debian network configuration from $FOUND_DEBNET to running system." + rm -rf /etc/network/run + cp -a /mnt/etc/network /etc + rm -rf /etc/network/run + mkdir /etc/network/run + umount /mnt ; eend $? + einfo "Starting network." + /etc/init.d/networking start ; eend $? + else + eerror "/etc/network/interfaces not found." ; eend 1 + fi + eoutdent + else + eerror "Error: /mnt already mounted." ; eend 1 + fi +fi +} +# }}} + +# {{{ disable console blanking +config_blanking(){ +if checkbootparam "noblank" ; then + einfo "Bootoption noblank found. Disabling monitor blanking." + setterm -blank 0 ; eend $? +fi +} +# }}} + +# {{{ grml2hd: automatic installation +config_grml2hd(){ + +if checkbootparam "user" ; then + NEWUSER='' + NEWUSER="$(getbootparam 'user' 2>>$DEBUG)" + sed -i "s/^NEWUSER=.*/NEWUSER=$NEWUSER/" /etc/grml2hd/config || export GRML2HD_FAIL=1 +fi + +if checkbootparam "filesystem" ; then + FILESYSTEM='' + FILESYSTEM="$(getbootparam 'filesystem' 2>>$DEBUG)" + sed -i "s/^FILESYSTEM=.*/FILESYSTEM=$FILESYSTEM/" /etc/grml2hd/config || export GRML2HD_FAIL=1 +fi + +if checkbootparam "partition" ; then + PARTITION='' + PARTITION="$(getbootparam 'partition' 2>>$DEBUG)" + # notice: the following checks whether the given partition is available, if not the skip + # execution of grml2hd as it might result in data loss... + if [ -r $PARTITION ] ; then + sed -i "s#^PARTITION=.*#PARTITION=$PARTITION#" /etc/grml2hd/config || export GRML2HD_FAIL=1 + else + ewarn "Partition $PARTITION does not exist. Skipping execution of grml2hd therefore." ; eend 1 + fi +fi + +if checkbootparam "mbr" ; then + BOOT_PARTITION='' + BOOT_PARTITION="$(getbootparam 'mbr' 2>>$DEBUG)" + sed -i "s#^BOOT_PARTITION=.*#BOOT_PARTITION=$BOOT_PARTITION#" /etc/grml2hd/config || export GRML2HD_FAIL=1 +fi + +if stringinstring "BOOT_IMAGE=grml2hd " "$CMDLINE" ; then + cat>|/usr/bin/grml2hd_noninteractive< +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Sam Sep 23 20:06:34 CEST 2006 [mika] +################################################################################ + +################################################################################ +# Notice: you can configure grml-autoconfig via adjusting the following values. +# Set them to 'yes' to activate them. But please notice that some options +# require an additional bootparam ("cheatcode") anyway, some options just +# de-/activate a check! +# +# If you want to deactivate an option just set it to 'no'. +# +# Take a look at the script 'grml-autoconfig' as well! +################################################################################ + +## These are the options you might want to adjust: ############################# + +# configure language - set keyboard layout +# notice: overwriting this variable is still possible through +# bootparameter lang=... +# See http://grml.org/faq/#language for more information. +# default: us +# LANGUAGE='de' + +# console font +# default: Lat15-Terminus16 +# CONSOLEFONT='iso15graf-16' + +# display information on running kernel +CONFIG_KERNEL='yes' + +# check for network devices and run dhclient +CONFIG_DHCP='yes' + +# check for frequency-scalable CPU and activate cpydyn/powernowd +CONFIG_CPU='no' + +# create /etc/fstab (this also de-/activates swap-partition) +CONFIG_FSTAB='yes' + +# load ACPI/APM modules +CONFIG_ACPI_APM='yes' + +# Enable DMA for all IDE drives - already done in initrd +# but make sure it's done also on harddisk-installed systems +CONFIG_DMA='yes' + +# set audio volumes +CONFIG_MIXER='no' + +# start syslog-ng +CONFIG_SYSLOG='yes' + +# start gpm +CONFIG_GPM='yes' + +################################################################################ +# Notice! Do not touch the following options except you really know +# what you are doing! +CONFIG_915RESOLUTION='no' # run 915resolution with specified options for adjusting resolution +CONFIG_AGP='yes' # check for bootparam forceagp +CONFIG_AUTOMOUNTER='no' # activate automounter +CONFIG_AUTOMOUNT='yes' # automounting of device labeled GRMLCFG +CONFIG_BLANKING='yes' # check for bootoption noblank to disable console blanking +CONFIG_BLINDSOUND='yes' # play 'beep' and play welcome message +CONFIG_BLIND='yes' # check for blind option or brltty +CONFIG_CDROM_PERM='yes' # for burning on IDE-CD-Roms, k3b (and others) check for special permissions +CONFIG_CDROM_SCRIPTS='yes' # run scripts from /cdrom/scripts +CONFIG_CONSOLE='yes' # activate mgetty when using console=... as bootparam +CONFIG_CREATE_MNT_DIRS='no' # create /mnt-directories +CONFIG_DEBNET='yes' # search for /etc/network/interfaces on partitions and set up network afterwards +CONFIG_DEBUG='yes' # activate start of shells during startup at several stages +CONFIG_DISCOVER='no' # use discover for hardware detection +CONFIG_DISTCC='no' # activate and setup distcc through bootparam distcc=$NETWORK,$INTERFACE +CONFIG_EXTRACT='yes' # specify which (only in combination with bootparam myconfig/netconfig useful) +CONFIG_FAST='yes' # skip startup of w3m on tty1 +CONFIG_FIREWIRE_DEV='no' # bugfix for kernel >=2.6.11 - create some firewire-devices +CONFIG_FIX_PASSWD='yes' # fix unionfs-problem with passwd +CONFIG_FIX_UNIONFS='yes' # fix/workaround for unionfs +CONFIG_USERFSTAB='yes' # check for username of uid 1000 +CONFIG_FWTIMEOUT='yes' # set timeout for firmware loading +CONFIG_GRML2HD='yes' # check for 'grml2hd' bootoption +CONFIG_HOMEDIR='yes' # check for persistent homedir option +CONFIG_HOSTNAME='yes' # set hostname to 'grml' on systems running from CD +CONFIG_HOTPLUG_MAIN='no' # start hotplug system [should be handled by udev now] +CONFIG_HOTPLUG_AGENT='no' # deactivate specific hotplug agent(s) via bootparam +CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam +CONFIG_HWINFO='no' # run hwinfo for module-detection (requires bootparam 'hwinfo'!) +CONFIG_INTERACTIVE='yes' # check for expert-mode as bootparam +CONFIG_LANGUAGE='yes' # allow language specification via commandline +CONFIG_LD_MOD='yes' # run ldconfig and depmod on systems running from harddisk; remove /etc/grml.first.boot for forcing +CONFIG_LOCAL_NET='yes' # bring up loopback interface +CONFIG_LOG='yes' # DEBUG=/dev/null or logfile int /tmp/... +CONFIG_MODEM='yes' # check for AC'97 Modem Controller modem +CONFIG_MODULES='yes' # load modules specified in /etc/grml/modules +CONFIG_MOUSE='yes' # show mouse information (expert-mode) +CONFIG_MYCONFIG='yes' # check if we want the config floppy +CONFIG_NETCONFIG='yes' # download configuration archive provided by bootoption netconfig=... +CONFIG_NETIPV6='yes' # check for bootparam ipv6 +CONFIG_PASSWD='yes' # set password via bootparam passwd +CONFIG_PCMCIA='no' # check for pcmcia and start cardmgr +CONFIG_SERVICES='yes' # check for services to run, provided via bootparam +CONFIG_SETKEYCODES='yes' # run setkeycodes when bootoption setkeycodes found +CONFIG_SMALL='yes' # use a less "bloat" /etc/inittab for small computer with less RAM +CONFIG_SPLASH='no' # bootsplash +CONFIG_SSH='yes' # check for bootparam ssh +CONFIG_SWSPEAK='no' # run software synthesizer via speakup +CONFIG_TESTCD='yes' # CD checker +CONFIG_TIME='yes' # set clock, check for bootparam utc/gmt [only in live-mode] +CONFIG_TIMEZONE='yes' # get bootparam 'tz' and set it as /etc/localtime [only in live-mode] +CONFIG_VMWARE='no' # vmware specific stuff (use xorg.conf.vmware) +CONFIG_WELCOME='yes' # play welcome sound (audio) +CONFIG_WONDERSHAPER='yes' # start wondershaper with options provided via bootparam +CONFIG_XSTARTUP='no' # start X window system via grml-x +## END OF FILE ################################################################# diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..b17c806 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,1231 @@ +grml-autoconfig (0.5-15) unstable; urgency=low + + * config_language: duplicate the getbootparam keyboard code to make + sure /etc/grml/language-functions does not overwrite our values... + + -- Michael Prokop Thu, 12 Oct 2006 13:00:17 +0200 + +grml-autoconfig (0.5-14) unstable; urgency=low + + * Check for existence of + /usr/share/consolefonts/Lat15-Terminus16.psf.gz + + -- Michael Prokop Sat, 7 Oct 2006 23:37:28 +0200 + +grml-autoconfig (0.5-13) unstable; urgency=low + + * Don't export $COUNTRY and $CHARSET anymore. + + -- Michael Prokop Wed, 4 Oct 2006 10:39:24 +0200 + +grml-autoconfig (0.5-12) unstable; urgency=low + + * Change 'chown grml.grml ...' into 'chown grml: ...'. Thanks, Worf! + * Remove /etc/sysconfig/. + + -- Michael Prokop Thu, 28 Sep 2006 16:30:42 +0200 + +grml-autoconfig (0.5-11) unstable; urgency=low + + * Use KEYTABLE="gr-utf8" for greek-utf8. + * grml-autoconfig script: change keyboard into language. + + -- Michael Prokop Mon, 25 Sep 2006 10:23:04 +0200 + +grml-autoconfig (0.5-10) unstable; urgency=low + + * Rewrote language code: + - support $LANG-utf8 + - use the script grml-setlang instead of output variable to + /etc/environment and /etc/sysconfig/* + - use CHARSET="iso8859-15" by default, support some new languages + - config_environment, config_running_from and config_keyboard + are deprecate now + * Removed discover from Suggests and added alsa-utils instead. + * Check for presence of aumix and amixer binaries in config_mixer. + * Cleanup of "doubled logic checks" like + "if ! [ -z ..." => "if [ -n ..."]. + * Check whether a swap partition is used already and inform user + about it. Support LABELs as well. + + -- Michael Prokop Sat, 23 Sep 2006 12:10:32 +0200 + +grml-autoconfig (0.5-9) unstable; urgency=low + + * Use "amixer get Front" in config_mixer so the IBM notebooks + have sound by default as well. Thanks Jimmy for debugging + and code-base! + + -- Michael Prokop Sun, 17 Sep 2006 16:29:28 +0200 + +grml-autoconfig (0.5-8) unstable; urgency=low + + * Check for lo device in /etc/network/run/ifstate before + running "ifup lo". + * Clean /etc/network/status/ before writing into it. + * Change { pump... } into ( pump... ). + + -- Michael Prokop Sat, 16 Sep 2006 15:08:30 +0200 + +grml-autoconfig (0.5-7) unstable; urgency=low + + * Move /etc/grml/lsb-functions to package grml-etc-core. + + -- Michael Prokop Sat, 16 Sep 2006 11:03:43 +0200 + +grml-autoconfig (0.5-6) unstable; urgency=low + + * Write status of pump into /etc/network/status/$DEVICE. + + -- Michael Prokop Fri, 15 Sep 2006 18:44:35 +0200 + +grml-autoconfig (0.5-5) unstable; urgency=low + + * Set CONFIG_CREATE_MNT_DIRS=no and warn when create_mnt_dirs() + is executed as grml-rebuildfstab does all we need from now on. + + -- Michael Prokop Mon, 11 Sep 2006 21:39:56 +0200 + +grml-autoconfig (0.5-4) unstable; urgency=low + + * Deactivate creation of /mnt/*-directories as grml-rebuildfstab + >= 0.3-1 takes care of it. Depend on grml-rebuildfstab package + >= 0.3-1 therefore. + + -- Michael Prokop Mon, 11 Sep 2006 15:51:22 +0200 + +grml-autoconfig (0.5-3) unstable; urgency=low + + * Run chpasswd with '-m' option. + + -- Michael Prokop Tue, 15 Aug 2006 12:35:54 +0200 + +grml-autoconfig (0.5-2) unstable; urgency=low + + * Run 'ifup lo' only in live-cd mode... + + -- Michael Prokop Sat, 12 Aug 2006 14:08:32 +0200 + +grml-autoconfig (0.5-1) unstable; urgency=low + + * Bumb version, grml 0.8 is coming closer... + + -- Michael Prokop Fri, 11 Aug 2006 11:48:44 +0200 + +grml-autoconfig (0.4-33) unstable; urgency=low + + * Use ifup instead of ifconfig for bringing up lo in + config_local_net(). + + -- Michael Prokop Thu, 10 Aug 2006 09:14:51 +0200 + +grml-autoconfig (0.4-32) unstable; urgency=low + + * Drop unused config_splash(). + + -- Michael Prokop Fri, 4 Aug 2006 12:14:50 +0200 + +grml-autoconfig (0.4-31) unstable; urgency=low + + * Use "timeout 4" when running dd on floppy drive. Thanks, Gebi! + + -- Michael Prokop Fri, 4 Aug 2006 10:12:34 +0200 + +grml-autoconfig (0.4-30) unstable; urgency=low + + * Check for running hal/d-bus and warn in acpid sequence then. + * Improved apm-stuff in config_acpi_apm. + + -- Michael Prokop Fri, 21 Jul 2006 13:06:52 +0200 + +grml-autoconfig (0.4-29) unstable; urgency=low + + * Moved generic $LANGUAGE stuff into its own file named + /etc/grml/language-functions so we can source the file + in grml-autoconfig and grml-scripts without having to + maintain it in several places. + * Write $LANG-stuff in config_environment to /etc/default/locales + if the file does not exist yet. + + -- Michael Prokop Tue, 18 Jul 2006 19:59:47 +0200 + +grml-autoconfig (0.4-28) unstable; urgency=low + + * Send errors to $DEBUG in checkgrmlsmall() and checkgrmlusb() + as there are people out there using grml-autoconfig on plain + Debian systems where /etc/grml_version does not exist. :) + + -- Michael Prokop Tue, 18 Jul 2006 18:41:51 +0200 + +grml-autoconfig (0.4-27) unstable; urgency=low + + * The "oh, I love GNU" Release. + * Adjusted tail command to get rid of the "Warning: "+number" syntax is + deprecated, please use "-n +number"". + * Added $CONFIG_BLANKING to disable console blanking (on request + by Marc 'Zugschlus' Haber). + * Added header to be Init Script LSB-compliant, see + http://wiki.debian.org/LSBInitScripts for details. + + -- Michael Prokop Fri, 7 Jul 2006 21:58:57 +0200 + +grml-autoconfig (0.4-26) unstable; urgency=low + + * Added support for /etc/init.d/boolocal.{pre,middle,post}. + * Added manpage grml-bootsplash.1. + * grml-bootsplash: switched to /bin/bash to make lintian happy, + improved error handling as well. + + -- Michael Prokop Sun, 4 Jun 2006 14:03:00 +0200 + +grml-autoconfig (0.4-25) unstable; urgency=low + + * Added textbased bootsplash support based on contribution + by Florian Keller , thanks! + * Run language stuff at the beginning so the fonts are + switched earlier. + + -- Michael Prokop Sat, 27 May 2006 11:23:15 +0200 + +grml-autoconfig (0.4-24) unstable; urgency=low + + * Reorderd $KEYTABLE check in config_environment. + + -- Michael Prokop Sun, 14 May 2006 21:30:47 +0200 + +grml-autoconfig (0.4-23) unstable; urgency=low + + * Added '-m' option to consolechars call. + + -- Michael Prokop Sun, 14 May 2006 17:13:40 +0200 + +grml-autoconfig (0.4-22) unstable; urgency=low + + * Moved check for bootoption [x]keyboard=... to config_environment. + + -- Michael Prokop Sun, 14 May 2006 16:59:34 +0200 + +grml-autoconfig (0.4-21) unstable; urgency=low + + * Adjust KEYTABLE of bootoption keyboard=de/at via + /etc/sysconfig/keyboard, otherwise we've a racecondition. + * Reworked charset code to run it on all tty's. + + -- Michael Prokop Sun, 14 May 2006 12:18:24 +0200 + +grml-autoconfig (0.4-20) unstable; urgency=low + + * The 'oh, we are lintian-clean again even though #360534' Release. + + -- Michael Prokop Fri, 12 May 2006 21:48:30 +0200 + +grml-autoconfig (0.4-19) unstable; urgency=low + + * Take KEYTABLE="de-latin1-nodeadkeys" for bootoptions keyboard=de + and keyboard=at. + + -- Michael Prokop Fri, 12 May 2006 21:32:21 +0200 + +grml-autoconfig (0.4-18) unstable; urgency=low + + * Added pump to depends. Thanks, Florian Keller! + + -- Michael Prokop Fri, 5 May 2006 13:01:11 +0200 + +grml-autoconfig (0.4-17) unstable; urgency=low + + * Support multiline settings in /cdrom/bootparams/*. Patch + contributed by Florian Keller, thanks! + + -- Michael Prokop Thu, 4 May 2006 22:48:43 +0200 + +grml-autoconfig (0.4-16) unstable; urgency=low + + * Adjusted $XKEYBOARD and $KDEKEYBOARD as suggested by + Florian Keller, thanks! + + -- Michael Prokop Wed, 3 May 2006 09:37:44 +0200 + +grml-autoconfig (0.4-15) unstable; urgency=low + + * Move $CMDLINE before the checkbootparam "nocolor" code. + Switch order of display and sourcing lsb-functions. + * Don't run bootlogd via initscript as startup might be + prevented via /etc/default/bootlogd. + + -- Michael Prokop Sun, 30 Apr 2006 16:10:29 +0200 + +grml-autoconfig (0.4-14) unstable; urgency=low + + * grml-autoconfig script reads in current state of options now. + + -- Michael Prokop Sun, 30 Apr 2006 14:55:57 +0200 + +grml-autoconfig (0.4-13) unstable; urgency=low + + * Removed config_color as it is handled when sourcing lsb-functions. + + -- Michael Prokop Sun, 30 Apr 2006 13:01:54 +0200 + +grml-autoconfig (0.4-12) unstable; urgency=low + + * Use consolechars instead of charset for $CHARMAP. + + -- Michael Prokop Sun, 30 Apr 2006 12:02:39 +0200 + +grml-autoconfig (0.4-11) unstable; urgency=low + + * Fixed wrong logic of nocolor check. + + -- Michael Prokop Sun, 30 Apr 2006 11:49:46 +0200 + +grml-autoconfig (0.4-10) unstable; urgency=low + + * Check for bootoption nocolor and source + /etc/grml/lsb-functions with RC_NOCOLOR=yes then. + + -- Michael Prokop Sun, 30 Apr 2006 01:00:03 +0200 + +grml-autoconfig (0.4-9) unstable; urgency=low + + * Fixed bootlogd problems, now we are starting it through the + init script. + * Fixed problem with loading charset because of using the + wrong variable. Thanks to Maciej 'harnir' Delmanowski! + + -- Michael Prokop Sun, 30 Apr 2006 00:01:49 +0200 + +grml-autoconfig (0.4-8) unstable; urgency=low + + * reworked language section + - improve indenting of case $LANGUAGE code... + - use Lat15-Terminus16 as default console font if + bootoption "nodefaultfont" isn't used, depend on + package console-terminus therefore + - use console font Lat2-Terminus16 instead of iso02g, + reported by Maciej 'harnir' Delmanowski, thanks! + - rename "Activating keyboard settings" to "Activating + language settings" + - add (deactivated) CONSOLEFONT to /etc/grml/autoconfig[.small] + * removed time-stuff from grml-autoconfig interface + * fixed name of keyboard code in grml-autoconfig interface + * added support for iso02 charmaps in config_keyboard, thanks to + Maciej 'harnir' Delmanowski! + + -- Michael Prokop Fri, 28 Apr 2006 22:35:34 +0200 + +grml-autoconfig (0.4-7) unstable; urgency=low + + * Run config_time and config_timezone only in live-mode. + + -- Michael Prokop Sun, 23 Apr 2006 20:05:51 +0200 + +grml-autoconfig (0.4-6) unstable; urgency=low + + * We must use $LANG for LC_ALL and LC_MESSAGES. + + -- Michael Prokop Sat, 22 Apr 2006 00:06:54 +0200 + +grml-autoconfig (0.4-5) unstable; urgency=low + + * config_environment: set LC_MESSAGES to $LANGUAGE + and LC_ALL to $LANGUAGE in /etc/environment + + -- Michael Prokop Fri, 21 Apr 2006 15:32:05 +0200 + +grml-autoconfig (0.4-4) unstable; urgency=low + + * Use /bin/ls instead of ls to prevent alias errors when + running interactive. + * Check for mounted /mnt/grml before unmounting. + * Always set returncode for variable $RC, avoid race conditions. + + -- Michael Prokop Fri, 21 Apr 2006 00:39:18 +0200 + +grml-autoconfig (0.4-3) unstable; urgency=low + + * Reworked config_fwtimeout for low default firmware timeout + of kernel. + + -- Michael Prokop Sun, 9 Apr 2006 12:28:39 +0200 + +grml-autoconfig (0.4-2) unstable; urgency=low + + * Don't run code from config_environment on hd-installation. + + -- Michael Prokop Sat, 8 Apr 2006 14:06:07 +0200 + +grml-autoconfig (0.4-1) unstable; urgency=low + + * New grml version. + + -- Michael Prokop Thu, 6 Apr 2006 16:18:43 +0200 + +grml-autoconfig (0.3-14) unstable; urgency=low + + * config_fstab: don't try to create empty dirs in /mnt/. + + -- Michael Prokop Wed, 5 Apr 2006 23:56:50 +0200 + +grml-autoconfig (0.3-13) unstable; urgency=low + + * Removed discover from grml-autoconfig interface. Nobody + needs that nowadays anymore... + * Activate config_fstab by default again in grml-autoconfig + interface. + * Reordered execution of $UID check and mktemp in grml-autoconfig + interface. + + -- Michael Prokop Mon, 3 Apr 2006 00:36:58 +0200 + +grml-autoconfig (0.3-12) unstable; urgency=low + + * Updated manpage. + + -- Michael Prokop Thu, 30 Mar 2006 00:25:14 +0200 + +grml-autoconfig (0.3-11) unstable; urgency=low + + * Reworked config_cpu(). Don't let the kernel decide what + cpufrequency modules we want but do it on our own using + the new cpufreq-detect.sh from grml-scripts. + + -- Michael Prokop Fri, 24 Mar 2006 11:25:38 +0100 + +grml-autoconfig (0.3-10) unstable; urgency=low + + * Improved config_swspeak (added sound output). + + -- Michael Prokop Thu, 23 Mar 2006 12:04:46 +0100 + +grml-autoconfig (0.3-9) unstable; urgency=low + + * Don't run rebuildfstab by default on hd-install's anymore via + grml-autoconfig script. + * Renamed CONFIG_FSTABUSER to CONFIG_USERFSTAB so adjusting + values via grml-autoconfig does not conflict with CONFIG_FSTAB. + + -- Michael Prokop Sat, 25 Feb 2006 20:02:58 +0100 + +grml-autoconfig (0.3-8) unstable; urgency=low + + * Added detection of software-suspend swap partitions to + config_fstab. Support use of ANYSWAP as well. + + -- Michael Prokop Sun, 19 Feb 2006 14:42:49 +0100 + +grml-autoconfig (0.3-7) unstable; urgency=low + + * Print $CMDLINE when in debug mode. + + -- Michael Prokop Thu, 16 Feb 2006 22:26:24 +0100 + +grml-autoconfig (0.3-6) unstable; urgency=low + + * Deactivated the 'not running under zsh' warning. + + -- Michael Prokop Fri, 10 Feb 2006 23:42:28 +0100 + +grml-autoconfig (0.3-5) unstable; urgency=low + + * Added an additional check for label on floppy disks via blkid + if running dd was successful to config_automount. Hopefully this + fixes the annoying 'GRMLCFG does not work with floppy disk' + problem. Needs some testing on real, problematic hardware though. + + -- Michael Prokop Tue, 31 Jan 2006 01:05:15 +0100 + +grml-autoconfig (0.3-4) unstable; urgency=low + + * Switched some einfo messages to ewarn + ("Skipping .. as requested" stuff). + + -- Michael Prokop Sun, 22 Jan 2006 15:11:12 +0100 + +grml-autoconfig (0.3-3) unstable; urgency=low + + * Adjusted $MEM variables in config_small to better react on low + memory systems. + * Bumbed required udev version in depends to version 0.080-1. + + -- Michael Prokop Sat, 21 Jan 2006 23:19:11 +0100 + +grml-autoconfig (0.3-2) unstable; urgency=low + + * Moved discover from depends to suggests. Added check for /sbin/discover + to config_discover. + + -- Michael Prokop Sat, 21 Jan 2006 20:12:01 +0100 + +grml-autoconfig (0.3-1) unstable; urgency=low + + * The 'hey, get your winterschlapfn' release. + + -- Michael Prokop Sat, 21 Jan 2006 13:43:30 +0100 + +grml-autoconfig (0.2-49) unstable; urgency=low + + * Oh, I forgot to print the 'no $IP'-code in config_distcc + only if bootparam distcc is set. Nothing serious, fixed anyway. + + -- Michael Prokop Fri, 20 Jan 2006 21:50:09 +0100 + +grml-autoconfig (0.2-48) unstable; urgency=low + + * Improved info messages in config_distcc. Don't try to start + distcc if no valid ip address or interface is available. + + -- Michael Prokop Fri, 20 Jan 2006 20:43:53 +0100 + +grml-autoconfig (0.2-47) unstable; urgency=low + + * Fixed volume handling in config_mixer (empty default variable). + * Wait until $IP is set in config_distcc or continue after 10 tries. + + -- Michael Prokop Fri, 20 Jan 2006 14:09:32 +0100 + +grml-autoconfig (0.2-46) unstable; urgency=low + + * Switched order of execution of config_kernel and config_vmware. + * Added bootoption novmware to skip execution of vmware specific + stuff. + + -- Michael Prokop Mon, 16 Jan 2006 22:02:57 +0100 + +grml-autoconfig (0.2-45) unstable; urgency=low + + * Fixed racecondition with unquoted $VARIABLES (thanks, Gebi!). + + -- Michael Prokop Sun, 15 Jan 2006 22:39:16 +0100 + +grml-autoconfig (0.2-44) unstable; urgency=low + + * Improved output of config_modem. + + -- Michael Prokop Sat, 14 Jan 2006 23:28:52 +0100 + +grml-autoconfig (0.2-43) unstable; urgency=low + + * speechd-up does not start through grml-autoconfig, so start + it manually after booting. Changed an einfo to eend as well. + + -- Michael Prokop Sat, 14 Jan 2006 22:51:07 +0100 + +grml-autoconfig (0.2-42) unstable; urgency=low + + * Run speechd-up in daemon mode. + * Disable config_pcmcia by default now (cardmgr is obsolete + with current kernel and udev). + * Removed pcmcia and firewirefix from grml-autoconfig interface. + + -- Michael Prokop Sat, 14 Jan 2006 18:34:50 +0100 + +grml-autoconfig (0.2-41) unstable; urgency=low + + * Added - experimental - config_swspeak / CONFIG_SWSPEAK + (run software synthesizer via speakup). + + -- Michael Prokop Sat, 14 Jan 2006 14:47:48 +0100 + +grml-autoconfig (0.2-40) unstable; urgency=low + + * Removed config_keyboard_cmdline and moved code from there to + config_language to avoid racecondition. Now using bootoptions + lang, keyboard and xkeyboard should work at the same time. + + -- Michael Prokop Thu, 12 Jan 2006 21:23:54 +0100 + +grml-autoconfig (0.2-39) unstable; urgency=low + + * Updated config_pcmcia so it works with new pcmciautils package, + where cardmgr isn't present anymore. Needs some tests, though. + * Install autoconfig.functions with permissions 755 so it can + be executed. + + -- Michael Prokop Thu, 12 Jan 2006 18:09:06 +0100 + +grml-autoconfig (0.2-38) unstable; urgency=low + + * Updated config_ipv6. + + -- Michael Prokop Mon, 9 Jan 2006 22:19:21 +0100 + +grml-autoconfig (0.2-37) unstable; urgency=low + + * Added ipv6 bootoption (thanks, Stephan Peijnik!). Needs + some testing though. + + -- Michael Prokop Sun, 8 Jan 2006 22:57:22 +0100 + +grml-autoconfig (0.2-36) unstable; urgency=low + + * Improved config_cpu: + - removed UUOL + - check for cpudyn-support (thanks, Stephan Peijnik!) + * Warn if running not under zsh. + * Switched 'eend 0 || eend 1' statements to 'eend $?'. + + -- Michael Prokop Sun, 8 Jan 2006 16:54:22 +0100 + +grml-autoconfig (0.2-35) unstable; urgency=low + + * Oh, wrong logic for $VOL in config_mixer. Fixed. + + -- Michael Prokop Sun, 8 Jan 2006 00:29:14 +0100 + +grml-autoconfig (0.2-34) unstable; urgency=low + + * Modified $NOSWAP logic in config_fstab for infotext. + * Add bootoption nofirewiredev in config_firewire_dev. + * Set CONFIG_FIREWIRE_DEV to no by default. + + -- Michael Prokop Sun, 8 Jan 2006 00:08:57 +0100 + +grml-autoconfig (0.2-33) unstable; urgency=low + + * Check for return codes in interface (thanks for hint, Gebi). + + -- Michael Prokop Sat, 7 Jan 2006 14:19:44 +0100 + +grml-autoconfig (0.2-32) unstable; urgency=low + + * Don't try to create stuff like /proc/bus/usb in config_fstab. + + -- Michael Prokop Sat, 7 Jan 2006 12:26:53 +0100 + +grml-autoconfig (0.2-31) unstable; urgency=low + + * Use wm-ng (fluxbox with addons) as default window manager for + bootoption startx. + + -- Michael Prokop Sat, 7 Jan 2006 11:53:14 +0100 + +grml-autoconfig (0.2-30) unstable; urgency=low + + * Added bootoption vol for setting volumes via aumix to config_mixer. + + -- Michael Prokop Thu, 5 Jan 2006 19:45:54 +0100 + +grml-autoconfig (0.2-29) unstable; urgency=low + + * Add function iszsh to autoconfig.functions and use setopt only + if running with zsh. + + -- Michael Prokop Thu, 5 Jan 2006 17:37:20 +0100 + +grml-autoconfig (0.2-28) unstable; urgency=low + + * Call rmnologin with start-option (thx4hint, Marc!). + * Don't output the 'overall' text in RAM-info. + + -- Michael Prokop Wed, 4 Jan 2006 14:29:18 +0100 + +grml-autoconfig (0.2-27) unstable; urgency=low + + * Improved output of RAM-info. + + -- Michael Prokop Tue, 3 Jan 2006 23:10:54 +0100 + +grml-autoconfig (0.2-26) unstable; urgency=low + + * Don't use discover by default anymore (udev does that now). + * Rewrote config_blacklist: + - run it only on live-cd + - use /etc/modprobe.d/grml + * Removed hotplug-light from grml-autoconfig interface and + set default for discover to 'off'. + + -- Michael Prokop Sat, 31 Dec 2005 18:22:25 +0100 + +grml-autoconfig (0.2-25) unstable; urgency=low + + * Some small changes in look'n'feel. + * Run config_small earlier. + * Rewrote output code of discover function. + * Rewrote code of config_acpi_apm. + * Added CONFIG_SETKEYCODES. + * Lot's of code cleanups. + * Rewrote bootoptions passwd and ssh. + * Implemented bootoption blacklist (notice: not used currently). + + -- Michael Prokop Tue, 27 Dec 2005 19:37:48 +0100 + +grml-autoconfig (0.2-24) unstable; urgency=low + + * Added check for RAM to config_small. + * Switched log_* lsb-functions to e* stuff. + + -- Michael Prokop Tue, 27 Dec 2005 17:17:49 +0100 + +grml-autoconfig (0.2-23) unstable; urgency=low + + * Fixed typo in config_fstab. + + -- Michael Prokop Wed, 21 Dec 2005 10:26:32 +0100 + +grml-autoconfig (0.2-22) unstable; urgency=low + + * Don't use static values for grml-autoconfig interface. + + -- Michael Prokop Sun, 18 Dec 2005 21:55:06 +0100 + +grml-autoconfig (0.2-21) unstable; urgency=low + + * Use 'harddisk' instead of 'Harddisk' as infotext (thx4hint, + Jens Kubieziel!). + + -- Michael Prokop Sat, 17 Dec 2005 23:16:39 +0100 + +grml-autoconfig (0.2-20) unstable; urgency=low + + * Added config_debnet (thanks, Marc Haber!). + + -- Michael Prokop Sat, 17 Dec 2005 18:54:25 +0100 + +grml-autoconfig (0.2-19) unstable; urgency=low + + * Fixed bug in config_cdrom_scripts which prevented + execution of files in /cdrom/scripts/. + + -- Michael Prokop Tue, 13 Dec 2005 19:16:45 +0100 + +grml-autoconfig (0.2-18) unstable; urgency=low + + * Run grml2hd-noninteractive inside GNU screen. + * Deactivate hotplug(-light) as udev handles this stuff + already. + * Added config_vmware (creates xorg.conf based on template). + + -- Michael Prokop Sun, 11 Dec 2005 12:39:34 +0100 + +grml-autoconfig (0.2-17) unstable; urgency=low + + * Some clean ups in lsb-functions. + + -- Michael Prokop Mon, 5 Dec 2005 11:21:11 +0100 + +grml-autoconfig (0.2-16) unstable; urgency=low + + * Adjusted hotplug-system for use with udev >=0.076-4. + * Merged gentoo-functions into lsb-functions. + + -- Michael Prokop Sun, 4 Dec 2005 23:31:38 +0100 + +grml-autoconfig (0.2-15) unstable; urgency=low + + * Added bootoption 'nomodules' to disable loading of modules + defined in /etc/grml/modules. + + -- Michael Prokop Sat, 3 Dec 2005 15:31:00 +0100 + +grml-autoconfig (0.2-14) unstable; urgency=low + + * Support module-init-tools-style of loading specific modules + through /etc/grml/modules - only available when running from + CD. + + -- Michael Prokop Sat, 3 Dec 2005 12:42:03 +0100 + +grml-autoconfig (0.2-13) unstable; urgency=low + + * Adjust /etc/hosts when using bootparam 'hostname=...' as well. + + -- Michael Prokop Thu, 1 Dec 2005 13:23:10 +0100 + +grml-autoconfig (0.2-12) unstable; urgency=low + + * Use getent for getting fstabuser. + + -- Michael Prokop Sat, 26 Nov 2005 19:58:02 +0100 + +grml-autoconfig (0.2-11) unstable; urgency=low + + * Upps, spelling error in fstab infotext - fixed that. + + -- Michael Prokop Mon, 21 Nov 2005 22:45:52 +0100 + +grml-autoconfig (0.2-10) unstable; urgency=low + + * Added infotext to config_fstab how to disable fstab generation. + + -- Michael Prokop Mon, 21 Nov 2005 15:58:59 +0100 + +grml-autoconfig (0.2-9) unstable; urgency=low + + * 855resolution is now 915resolution. + * Added support for setting hostname via bootparam 'hostname=...'. + * Added bootparam distcc, set via distcc=$NETWORK,$LISTENER. + + -- Michael Prokop Wed, 16 Nov 2005 18:31:41 +0100 + +grml-autoconfig (0.2-8) unstable; urgency=low + + * Just a small cosmetic fix in GRMLCFG-code. + + -- Michael Prokop Thu, 10 Nov 2005 23:38:16 +0100 + +grml-autoconfig (0.2-7) unstable; urgency=low + + * Adjusted output of floppy mount of GRMLCFG device. + * Removed debug output in language code. + + -- Michael Prokop Thu, 10 Nov 2005 10:51:23 +0100 + +grml-autoconfig (0.2-6) unstable; urgency=low + + * Some small bugfixes in config_swap. + * Improved language settings. Setting LANGUAGE is now also possible + via configuring $LANGUAGE in /etc/grml/autoconfig. + + -- Michael Prokop Tue, 8 Nov 2005 13:49:23 +0100 + +grml-autoconfig (0.2-5) unstable; urgency=low + + * Added CONFIG_FAST for skipping startup of w3m via bootparam + 'fast'. + + -- Michael Prokop Sun, 6 Nov 2005 16:25:12 +0100 + +grml-autoconfig (0.2-4) unstable; urgency=low + + * Added /etc/init.d/grml-autoconfig.strace + + -- Michael Prokop Thu, 3 Nov 2005 17:03:37 +0100 + +grml-autoconfig (0.2-3) unstable; urgency=low + + * Added check for existence of /usr/X11R6/bin/X in startx + bootparam. + + -- Michael Prokop Tue, 1 Nov 2005 19:32:44 +0100 + +grml-autoconfig (0.2-2) unstable; urgency=low + + * Fixed message of accessing floppy disk in config_automount. + + -- Michael Prokop Tue, 1 Nov 2005 18:46:11 +0100 + +grml-autoconfig (0.2-1) unstable; urgency=low + + * Let's bumb version to 0.2 as grml-autoconfig is already shipped + with grml 0.5. + * Let's drop /etc/init.d/grml-autoconfig.old + * Changed access to floppy device from mount command to dd + in config_automount (thanks for idea, gebi!). + + -- Michael Prokop Tue, 1 Nov 2005 18:35:50 +0100 + +grml-autoconfig (0.1-56) unstable; urgency=low + + * Added infotext in config_automount. + + -- Michael Prokop Sun, 23 Oct 2005 16:35:37 +0200 + +grml-autoconfig (0.1-55) unstable; urgency=low + + * Improved device handling in config_automount. + + -- Michael Prokop Sun, 23 Oct 2005 15:25:26 +0200 + +grml-autoconfig (0.1-54) unstable; urgency=low + + * Automounting works so added CONFIG_AUTOMOUNT to autoconfig + and autoconfig.small. + * Improved config_debug so we can use screen with full featured + shell (providing job handling). + * We have to use directory /cdrom/bootparams/ and not a single + file for multisessions. + + -- Michael Prokop Sun, 23 Oct 2005 12:45:09 +0200 + +grml-autoconfig (0.1-53) unstable; urgency=low + + * Invoke a /bin/zsh after running grml2hd in non-interactive + mode in any case. + * We do need check for /cdrom/bootparams in /etc/init.d/grml-autoconfig + of course. + + -- Michael Prokop Sun, 23 Oct 2005 00:40:13 +0200 + +grml-autoconfig (0.1-52) unstable; urgency=low + + * Finished documentation in /etc/grml/autoconfig[.small]. + + -- Michael Prokop Thu, 20 Oct 2005 11:42:26 +0200 + +grml-autoconfig (0.1-51) unstable; urgency=low + + * Only a small clean up of info message in config_homedir. + + -- Michael Prokop Tue, 18 Oct 2005 21:52:31 +0200 + +grml-autoconfig (0.1-50) unstable; urgency=low + + * Updated config_modem (don't start if it sl-modem is not present). + + -- Michael Prokop Mon, 17 Oct 2005 16:16:31 +0200 + +grml-autoconfig (0.1-49) unstable; urgency=low + + * Added partconf to CONFIG_MYCONFIG. + * Fixed problem in script grml-autoconfig with exit status + of set_values-function. + * Added wlan to strings of /proc/net/dev in config_dhcp (thanks to + Martin 'mabu' Buchleitner!). + * Fixed architecure specific things. + - This package is an architecture all file + - acpid is i386, amd64 only, so added apmd as alternative + -> Thanks Alexander Wirt ! + * Use /cdrom/bootparams for additional bootparams. + * Oh, it's /var/log/boot and not bootlogd - adjusted infotext. + + -- Michael Prokop Wed, 12 Oct 2005 16:29:20 +0200 + +grml-autoconfig (0.1-48) unstable; urgency=low + + * Rewrote CONFIG_MYCONFIG. + + -- Michael Prokop Tue, 11 Oct 2005 18:30:06 +0200 + +grml-autoconfig (0.1-47) unstable; urgency=low + + * Removed CONFIG_RNETCONFIG and rewrote functions for + CONFIG_NETCONFIG. + + -- Michael Prokop Thu, 6 Oct 2005 17:26:08 +0200 + +grml-autoconfig (0.1-46) unstable; urgency=low + + * Deprecated CONFIG_REMOUNT_ROOT. + + -- Michael Prokop Wed, 5 Oct 2005 23:11:57 +0200 + +grml-autoconfig (0.1-45) unstable; urgency=low + + * Oh, NONINTERACTIVE does not work as expected for hotplug-light. + Changed back to old behaviour therefore. + + -- Michael Prokop Sun, 2 Oct 2005 17:35:17 +0200 + +grml-autoconfig (0.1-44) unstable; urgency=low + + * Updated finish langauge settings (merged from knoppix mailing + list). + + -- Michael Prokop Sat, 1 Oct 2005 21:41:13 +0200 + +grml-autoconfig (0.1-43) unstable; urgency=low + + * Adjusted BOOTDEBUG with printk-settings. + + -- Michael Prokop Sat, 1 Oct 2005 16:16:47 +0200 + +grml-autoconfig (0.1-42) unstable; urgency=low + + * Fixed rebuildfstab command. + + -- Michael Prokop Sat, 1 Oct 2005 14:44:39 +0200 + +grml-autoconfig (0.1-41) unstable; urgency=low + + * Run hotplug-light with NONINTERACTIVE=yes so we supress + error messages while booting... + * Upps, hotplug-light was already in depends, removed again. + + -- Michael Prokop Sat, 1 Oct 2005 12:11:10 +0200 + +grml-autoconfig (0.1-40) unstable; urgency=low + + * Moved kernel ring buffer settings behind color-stuff. + * Added hotplug-light to depends. + + -- Michael Prokop Sat, 1 Oct 2005 02:08:48 +0200 + +grml-autoconfig (0.1-39) unstable; urgency=low + + * Use grml-autoconfig in runlevel 2: modified postinstall script. + * Added syslog-ng to depends. + + -- Michael Prokop Sat, 1 Oct 2005 02:03:17 +0200 + +grml-autoconfig (0.1-38) unstable; urgency=low + + * Added gpm to depends. + + -- Michael Prokop Sat, 1 Oct 2005 00:51:52 +0200 + +grml-autoconfig (0.1-37) unstable; urgency=low + + * Added check if rebuildfstab binary is present. + + -- Michael Prokop Sat, 1 Oct 2005 00:34:33 +0200 + +grml-autoconfig (0.1-36) unstable; urgency=low + + * Added /etc/sysconfig-directory with empty files to make sure + the files exist. + + -- Michael Prokop Sat, 1 Oct 2005 00:15:53 +0200 + +grml-autoconfig (0.1-35) unstable; urgency=low + + * Modified gpm-startup (thanks, gebi!) - this should fix the + "missing /dev/psaux" problem. + * Added CONFIG_855RESOLUTION. + * Updated manpage. + + -- Michael Prokop Tue, 27 Sep 2005 22:34:13 +0200 + +grml-autoconfig (0.1-34) unstable; urgency=low + + * Adjusted infotext in grml-autonconfig for dhcp-option + (s/dhclient/pump/) [thanks for reporting, hecka!]. + * Added cf (French Canadian version) to suppported languages + (taken from knoppix mailinglist). + + -- Michael Prokop Tue, 27 Sep 2005 13:10:33 +0200 + +grml-autoconfig (0.1-33) unstable; urgency=low + + * Implemented boot options for automatic grml2hd-installation: + - user + - filesystem + - partition + - bootpartition + * Adjust kernel ring buffer at beginng of grml-autoconfig. + + -- Michael Prokop Sun, 25 Sep 2005 00:53:32 +0200 + +grml-autoconfig (0.1-32) unstable; urgency=low + + * Added check for root-permissions to script grml-autoconfig. + + -- Michael Prokop Sat, 24 Sep 2005 23:15:49 +0200 + +grml-autoconfig (0.1-31) unstable; urgency=low + + * Added CONFIG_GRML2HD for automatic installation via bootoption + grml2hd. + + -- Michael Prokop Wed, 21 Sep 2005 22:25:13 +0200 + +grml-autoconfig (0.1-30) unstable; urgency=low + + * No, let's drop the /proc/bus/usb code, we should handle this via + /etc/init.d/mountvirtfs. + + -- Michael Prokop Wed, 21 Sep 2005 18:45:42 +0200 + +grml-autoconfig (0.1-29) unstable; urgency=low + + * Let's mount /proc/bus/usb in mount_proc if not booting with 'nousb'. + + -- Michael Prokop Wed, 21 Sep 2005 18:38:43 +0200 + +grml-autoconfig (0.1-28) unstable; urgency=low + + * Let's drop config_checkfs -> CONFIG_CHECKFS='no', we should + handle this via update-rc.d / runlevels. + * Use 'hostname --file /etc/hostname' instead of 'hostname grml' + and use it also on harddisk installations. + + -- Michael Prokop Tue, 20 Sep 2005 14:55:21 +0200 + +grml-autoconfig (0.1-27) unstable; urgency=low + + * Let's use 'xorgcfg -textmode' for interactive setup. + + -- Michael Prokop Sat, 17 Sep 2005 12:05:18 +0200 + +grml-autoconfig (0.1-26) unstable; urgency=low + + * Redirect output of check_partitions to /dev/null. + * Moved startup of syslog to an earlier place. + + -- Michael Prokop Fri, 16 Sep 2005 13:50:58 +0200 + +grml-autoconfig (0.1-25) unstable; urgency=low + + * Modified bootoption 'log'; bootlogd is broken with sysvinit_2.86.ds1-2_i386.deb + but works with sysvinit_2.86.ds1-1.1_i386.deb, hmpf. + + -- Michael Prokop Mon, 12 Sep 2005 10:22:25 +0200 + +grml-autoconfig (0.1-24) unstable; urgency=low + + * Let's make autoconfig.functions executable and use /usr/bin/zsh. + * Fixed bootoption 'log' (missing a variable export). + + -- Michael Prokop Mon, 12 Sep 2005 02:53:15 +0200 + +grml-autoconfig (0.1-23) unstable; urgency=low + + * Added new bootoption CONFIG_FWTIMEOUT for setting timeout + for firmware loading (via /sys/class/firmware/timeout). + + -- Michael Prokop Mon, 12 Sep 2005 01:57:59 +0200 + +grml-autoconfig (0.1-22) unstable; urgency=low + + * Adjusted options for use with new config framework (CONFIG_NETCONFIG / + CONFIG_RNETCONFIG). (Thanks for reporting, Marc Haber!) + + -- Michael Prokop Sat, 10 Sep 2005 11:47:38 +0200 + +grml-autoconfig (0.1-21) unstable; urgency=low + + * Some small eye-candy-improvements in script grml-autoconfig. + Output message if adjusting values worked, error message on failure. + + -- Michael Prokop Mon, 5 Sep 2005 01:49:23 +0200 + +grml-autoconfig (0.1-20) unstable; urgency=low + + * Renamed config_config to config_netconfig, config_rconfig to + config_rnetconfig. + * Added config_scripts, config_debs, config_config. + * Some more cleanups (changed some more echo-ing stuff + to lsb-functions). + + -- Michael Prokop Mon, 5 Sep 2005 01:23:59 +0200 + +grml-autoconfig (0.1-19) unstable; urgency=low + + * The 'now we have an interface and are lintian-clean' release. + * Added script grml-autoconfig (interface to configuration + file /etc/grml/autoconfig). + * Renamed CONFIG_HOTPLUG to CONFIG_HOTPLUG_MAIN. + * Made package lintian-clean (use /usr/bin/zsh as zsh path, + added dependency to zsh, let's use update-rc.d for + /etc/init.d/grml-autoconfig). + + -- Michael Prokop Mon, 5 Sep 2005 00:26:20 +0200 + +grml-autoconfig (0.1-18) unstable; urgency=low + + * Added config_fix_passwd (fix passwd-problem). + + -- Michael Prokop Wed, 17 Aug 2005 21:23:09 +0200 + +grml-autoconfig (0.1-17) unstable; urgency=low + + * Added small hint to config_x_startup. + + -- Michael Prokop Sun, 14 Aug 2005 17:58:57 +0200 + +grml-autoconfig (0.1-16) unstable; urgency=low + + * Let's support startx only on live-cd-systems (because of + the init-hack). Prompt useful message instead on harddisk-systems. + + -- Michael Prokop Sun, 14 Aug 2005 14:32:15 +0200 + +grml-autoconfig (0.1-15) unstable; urgency=low + + * Fixed value for cs/cz-keyboard-layout. + * Added checkgrmlusb. + * Added config_x_startup for bootparam 'startx[=windowmanager]'. + * Improved handling of DEBUG=..... + * Let's run loadkeys in background. + + -- Michael Prokop Sun, 7 Aug 2005 21:22:54 +0200 + +grml-autoconfig (0.1-14) unstable; urgency=low + + * Improved language support for grml-small (let's use LANG=C there) via + function checkgrmlsmall. + + -- Michael Prokop Thu, 28 Jul 2005 10:13:15 +0200 + +grml-autoconfig (0.1-13) unstable; urgency=low + + * We don't want to use mouseconfig anymore. + + -- Michael Prokop Thu, 14 Jul 2005 11:49:53 +0200 + +grml-autoconfig (0.1-12) unstable; urgency=low + + * We don't need kbdconfig anymore, now we call + /usr/sbin/dpkg-reconfigure console-data. + + -- Michael Prokop Thu, 14 Jul 2005 11:33:10 +0200 + +grml-autoconfig (0.1-11) unstable; urgency=low + + * Added support for bootsplash. + * Reordered execution of grml-autoconfig functions. + + -- Michael Prokop Sun, 10 Jul 2005 12:37:52 +0200 + +grml-autoconfig (0.1-10) unstable; urgency=low + + * Adjusted black-bootparam for use with hotplug-light. + * Fixed passwd and ssh bootparams (problems with chpasswd). + * Added CONFIG_CONSOLE for use with mgetty. + * Slightly improved CONFIG_CREATE_MNT_DIRS. + + -- Michael Prokop Tue, 5 Jul 2005 00:10:38 +0200 + +grml-autoconfig (0.1-9) unstable; urgency=low + + * Fixed 'grml testcd'-cheatcode (md5sum-handling). + + -- Michael Prokop Mon, 4 Jul 2005 01:29:08 +0200 + +grml-autoconfig (0.1-8) unstable; urgency=low + + * Let's always activate check_partitions. + * Fixed debug bootparam handling. + + -- Michael Prokop Sun, 3 Jul 2005 23:28:39 +0200 + +grml-autoconfig (0.1-7) unstable; urgency=low + + * Adjusted hotplug for use with hotplug-light (but still works + with hotplug anyway). + + -- Michael Prokop Sun, 3 Jul 2005 21:06:09 +0200 + +grml-autoconfig (0.1-6) unstable; urgency=low + + * Added CONFIG_CREATE_MNT_DIRS for creating all directories defined + as mounting target in /etc/fstab. + + -- Michael Prokop Sat, 2 Jul 2005 23:07:31 +0200 + +grml-autoconfig (0.1-5) unstable; urgency=low + + * Added workaround/fix for unionfs ('apt-...' segfaults cause + of problems with /var/cache/apt/*.bin): CONFIG_FIX_UNIONFS + * Let's create firewire devices not only with kernel 2.6.11. + * Improved CONFIG_LD_MOD. + + -- Michael Prokop Fri, 1 Jul 2005 01:09:31 +0200 + +grml-autoconfig (0.1-4) unstable; urgency=low + + * Updated conflicts (for installation without conflicts with grml-etc). + + -- Michael Prokop Sat, 25 Jun 2005 22:55:23 +0200 + +grml-autoconfig (0.1-3) unstable; urgency=low + + * Included new grml-autoconfig-framework. Now it's possible to + control grml-autoconfig behaviour via /etc/grml/autoconfig. + Notice that you can fall back to /etc/init.d/grml-autoconfig.old + if you consider any problems at the moment. + + -- Michael Prokop Sat, 25 Jun 2005 00:51:16 +0200 + +grml-autoconfig (0.1-2) unstable; urgency=low + + * Added conflicts to debian/control. + + -- Michael Prokop Thu, 9 Jun 2005 00:49:48 +0200 + +grml-autoconfig (0.1-1) unstable; urgency=low + + * Initial release. + + -- Michael Prokop Sun, 5 Jun 2005 18:47:51 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d2dcd7a --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: grml-autoconfig +Section: grml +Priority: optional +Maintainer: Michael Prokop +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.6.2 + +Package: grml-autoconfig +Architecture: all +Conflicts: grml-etc (<= 0.4-7) +Depends: ${shlibs:Depends}, ${misc:Depends}, acpid | apmd, laptop-detect, hotplug | hotplug-light | udev (>= 0.080-1), zsh, gpm, syslog-ng, console-terminus, pump, grml-rebuildfstab (>= 0.3-1), grml-etc-core (>= 0.1-3), grml-scripts (>= 0.8-14) +Suggests: hwinfo, alsa-utils +Description: main bootup process of a grml system + grml-autoconfig is the main part of the bootup process of the + grml system. This includes the hardware recognition system. + . + grml-autoconfig is also a script which is an interface to + the configuration system (see /etc/grml/autoconfig) of + the framework. + . + Homepage: http:/grml.org/ diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..329e0fa --- /dev/null +++ b/debian/copyright @@ -0,0 +1,27 @@ +This package was debianized by Michael Prokop on +Sun, 5 Jun 2005 18:47:51 +0200. + +It was downloaded from http://grml.org/ + +Copyright Holder: Michael Prokop + +License: + + This software is copyright (c) 2004-2006 by Michael Prokop. + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/debian/overrides b/debian/overrides new file mode 100644 index 0000000..85bb9a9 --- /dev/null +++ b/debian/overrides @@ -0,0 +1,2 @@ +grml-autoconfig: unknown-section grml +grml-autoconfig: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/grml-autoconfig.strace diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..2e94284 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,41 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ]; then + update-rc.d grml-autoconfig start 30 2 . >/dev/null + +# begin of "create special init scripts which won't be touched any more by grml" +. /etc/grml/lsb-functions +INITSCRIPT=bootlocal +INITNAME=/etc/init.d/${INITSCRIPT} +DATE=$(date) + +for initscript in ${INITNAME}.first ${INITNAME}.middle ${INITNAME}.last ; do + if ! [ -r "$initscript" ] ; then + einfo "Creating ${initscript}" + cat >$initscript </dev/null +update-rc.d ${INITSCRIPT}.middle start 29 2 . >/dev/null +update-rc.d ${INITSCRIPT}.last start 99 2 . >/dev/null +# end of "create special init scripts which won't be touched any more by grml" + +fi + +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..b0e8fcc --- /dev/null +++ b/debian/postrm @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +if [ "$1" = "purge" ]; then + update-rc.d grml-autoconfig remove >/dev/null || exit 0 + +# don't delete /etc/init.d/bootlocal* scripts, even not when purging - notice therefore: + . /etc/grml/lsb-functions + INITSCRIPT=bootlocal + INITNAME=/etc/init.d/$INITSCRIPT + if [ -r "${INITNAME}.first" ] ; then + ewarn "Notice: ${INITNAME}.{first,middle,last} won't be deleted automatically." ; eend 0 + ewarn "If you want to remove them delete them manually and then run:" + echo " update-rc.d ${INITSCRIPT}.first remove" + echo " update-rc.d ${INITSCRIPT}.middle remove" + echo " update-rc.d ${INITSCRIPT}.last remove" + fi +fi + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..38bd7a3 --- /dev/null +++ b/debian/rules @@ -0,0 +1,68 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp + +build-stamp: + dh_testdir + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs etc/grml etc/init.d usr/sbin usr/bin + + # Add here commands to install the package into debian/grml-autoconfig. + install -m 755 grml-autoconfig debian/grml-autoconfig/etc/init.d/grml-autoconfig + install -m 644 autoconfig debian/grml-autoconfig/etc/grml/autoconfig + install -m 644 autoconfig.small debian/grml-autoconfig/etc/grml/autoconfig.small + install -m 755 autoconfig.functions debian/grml-autoconfig/etc/grml/autoconfig.functions + install -m 644 language-functions debian/grml-autoconfig/etc/grml/language-functions + install -m 755 sbin/grml-autoconfig debian/grml-autoconfig/usr/sbin/grml-autoconfig + install -m 755 grml-bootsplash debian/grml-autoconfig/usr/bin/grml-bootsplash + # just as a "backup" solution: + cp -a etc/* debian/grml-autoconfig/etc/ + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installman man/grml-autoconfig.8 man/grml-bootsplash.1 + dh_link + dh_strip + dh_compress + mkdir -p $(CURDIR)/debian/grml-autoconfig/usr/share/lintian/overrides/ + cp -av debian/overrides $(CURDIR)/debian/grml-autoconfig/usr/share/lintian/overrides/grml-autoconfig + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/etc/grml/modules b/etc/grml/modules new file mode 100644 index 0000000..dd15099 --- /dev/null +++ b/etc/grml/modules @@ -0,0 +1,11 @@ +# /etc/grml/modules: kernel modules to load at boot time when running from CD. +# If you want to load specific modules when running from harddisk configure +# /etc/modules and make sure /etc/init.d/module-init-tools is activate +# in /etc/runlevel.conf +# +# This file should contain the names of kernel modules that are +# to be loaded at boot time, one per line. Comments begin with +# a `#', and everything on the line after them are ignored. + +evdev +fuse diff --git a/etc/grml/partconf b/etc/grml/partconf new file mode 100644 index 0000000..d9ff125 --- /dev/null +++ b/etc/grml/partconf @@ -0,0 +1,4 @@ +/etc/apt/ +/etc/ssh/ +/etc/network/ +/etc/grml/ diff --git a/etc/init.d/grml-autoconfig.strace b/etc/init.d/grml-autoconfig.strace new file mode 100755 index 0000000..3b1a0d2 --- /dev/null +++ b/etc/init.d/grml-autoconfig.strace @@ -0,0 +1,12 @@ +#!/bin/sh +# Filename: grml-autoconfig.strace +# Purpose: strace grml-autoconfig for use with mksquashfs/mkisos sort option +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Thu Nov 03 17:03:03 CET 2005 [mika] +################################################################################ + +/usr/bin/strace -f -eopen,stat64,execve -o /etc/grml/strace.autoconfig /etc/init.d/grml-autoconfig "$*" & + +## END OF FILE ################################################################# diff --git a/grml-autoconfig b/grml-autoconfig new file mode 100755 index 0000000..43fdeae --- /dev/null +++ b/grml-autoconfig @@ -0,0 +1,268 @@ +#!/bin/zsh +# Filename: /etc/init.d/grml-autoconfig +# Purpose: basic system configuration and hardware setup for grml system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Fre Aug 04 12:13:13 CEST 2006 [mika] +################################################################################ + +# http://wiki.debian.org/LSBInitScripts => +### BEGIN INIT INFO +# Provides: grml-autoconfig +# Required-Start: +# Required-Stop: +# Should-Start: udev +# Default-Start: S 2 3 4 5 +# Default-Stop: +### END INIT INFO + +if [[ $1 == "restart" ]] ; then + echo "$0 restart - empty placeholder. Doing nothing but running." +fi + +if [[ $1 == "force-reload" ]] ; then + echo "$0 force-reload - empty placeholder. Doing nothing but running." +fi + +if [[ $1 == "stop" ]] ; then + echo "$0 stop - empty placeholder. Doing nothing but exiting." + exit 1 +fi + +# {{{ path, signals, umask, zsh, colors +export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin" +umask 022 +# Ignore these signals: INT, TERM, SEGV +trap "" 2 3 11 + +# zsh stuff +setopt no_nomatch # avoid 'no matches found: ...' +# }}} + +# {{{ source main files +source /etc/grml/autoconfig # configuration file +source /etc/grml/autoconfig.functions # functions +source /etc/grml/lsb-functions +# }}} + +# {{{ mount important directories +mount_proc +mount_pts +mount_sys +# }}} + +# {{{ Read in boot parameters +CMDLINE="$(cat /proc/cmdline)" +[ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/* | tr '\n' ' ')" +# }}} + +# {{{ main grml-autoconfig +checkvalue $CONFIG_DEBUG && config_debug + +SPLASH='' +if checkbootparam "splash" ; then + SPLASH=1 +fi + +if [ -z "$SPLASH" ] ; then + stage=5 + rundebugshell +fi + +if [ -z "$BOOTDEBUG" ] ; then + einfo "Setting kernel ring buffer to level 2." + echo "2" > /proc/sys/kernel/printk ; eend $? +else + einfo "Setting kernel ring buffer to level 6. Adjust manually via running dmesg -n \$VALUE." + echo "6" > /proc/sys/kernel/printk ; eend $? +fi + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|">/dev/tty7 + +checkvalue $CONFIG_LANGUAGE && config_language + +checkvalue $CONFIG_LOG && config_log + +checkvalue $CONFIG_SWSPEAK && config_swspeak + +checkvalue $CONFIG_FWTIMEOUT && config_fwtimeout + +checkvalue $CONFIG_FIX_PASSWD && config_fix_passwd + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "||">/dev/tty7 + +checkvalue $CONFIG_HOSTNAME && config_hostname + +checkvalue $CONFIG_USERFSTAB && config_userfstab + +checkvalue $CONFIG_TIME && config_time + +checkvalue $CONFIG_KERNEL && config_kernel + +checkvalue $CONFIG_VMWARE && config_vmware + +checkvalue $CONFIG_SMALL && config_small + +checkvalue $CONFIG_LD_MOD && config_ld_mod + +checkvalue $CONFIG_TIMEZONE && config_timezone + +checkvalue $CONFIG_FAST && config_fast + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|||">/dev/tty7 + +checkvalue $CONFIG_ENVIRONMENT && config_environment + +# No kernel messages while probing modules +echo "0" > /proc/sys/kernel/printk + +checkvalue $CONFIG_CDROM_PERM && config_cdrom_perm + +checkvalue $CONFIG_LOCAL_NET && config_local_net + +checkvalue $CONFIG_FIREWIRE_DEV && config_firewire_dev + +checkvalue $CONFIG_TESTCD && config_testcd + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "||||">/dev/tty7 + +checkvalue $CONFIG_DISCOVER && config_discover + +checkvalue $CONFIG_HWINFO && config_hwinfo + +checkvalue $CONFIG_HOTPLUG_AGENT && config_hotplug_agent + +checkvalue $CONFIG_HOTPLUG_BLACKLIST && config_hotplug_blacklist + +checkvalue $CONFIG_HOTPLUG_MAIN && config_hotplug + +checkvalue $CONFIG_MODULES && config_modules + +checkvalue $CONFIG_ACPI_APM && config_acpi_apm + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|||||">/dev/tty7 + +checkvalue $CONFIG_PCMCIA && config_pcmcia + +# {{{ Read in what hwsetup has found +[ -f /etc/sysconfig/grml ] && . /etc/sysconfig/grml +# }}} + +checkvalue $CONFIG_KEYBOARD && config_keyboard + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "||||||">/dev/tty7 + +checkvalue $CONFIG_BLIND && config_blind + +checkvalue $CONFIG_INTERACTIVE && config_interactive + +checkvalue $CONFIG_AGP && config_agp + +[ -f /etc/sysconfig/grml ] && . /etc/sysconfig/grml + +checkvalue $CONFIG_AUTOMOUNTER && config_automounter + +checkvalue $CONFIG_DMA && config_dma + +checkvalue $CONFIG_FSTAB && config_fstab + +checkvalue $CONFIG_MOUSE && config_mouse + +checkvalue $CONFIG_DHCP && config_dhcp + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|||||||">/dev/tty7 + +checkvalue $CONFIG_SYSLOG && config_syslog + +checkvalue $CONFIG_CPU && config_cpu + +checkvalue $CONFIG_SSH && config_ssh + +checkvalue $CONFIG_PASSWD && config_passwd + +checkvalue $CONFIG_EXTRACT && config_extract + +checkvalue $CONFIG_HOMEDIR && config_homedir + +checkvalue $CONFIG_MYCONFIG && config_myconfig + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "||||||||">/dev/tty7 + +checkvalue $CONFIG_CDROM_SCRIPTS && config_cdrom_scripts + +# device symlinks {{{ + [ -r /mnt/floppy ] || mkdir /mnt/floppy + [ -r /mnt/cdrom ] || mkdir /mnt/cdrom + [ -r /mnt/test ] || mkdir /mnt/test +# }}} + +checkvalue $CONFIG_MIXER && config_mixer + +checkvalue $CONFIG_MODEM && config_modem + +checkvalue $CONFIG_WONDERSHAPER && config_wondershaper + +checkvalue $CONFIG_GPM && config_gpm + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|||||||||">/dev/tty7 + +checkvalue $CONFIG_SERVICES && config_services + +checkvalue $CONFIG_NETCONFIG && config_netconfig + +checkvalue $CONFIG_NETIPV6 && config_ipv6 + +checkvalue $CONFIG_DEBNET && config_debnet + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "||||||||||">/dev/tty7 + +checkvalue $CONFIG_CONSOLE && config_console + +checkvalue $CONFIG_SETKEYCODES && config_setkeycodes + +checkvalue $CONFIG_BLINDSOUND && config_blindsound + +checkvalue $CONFIG_WELCOME && config_welcome + +checkvalue $CONFIG_FIX_UNIONFS && fix_unionfs + +checkvalue $CONFIG_CREATE_MNT_DIRS && create_mnt_dirs + +checkvalue $CONFIG_915RESOLUTION && config_915resolution + +checkvalue $CONFIG_AUTOMOUNT && config_automount + +checkvalue $CONFIG_DISTCC && config_distcc + +checkvalue $CONFIG_BLANKING && config_blanking + +[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|||||||||||">/dev/tty7 + +checkvalue $CONFIG_GRML2HD && config_grml2hd + +checkvalue $CONFIG_XSTARTUP && config_x_startup +# }}} + +# {{{ debug +if [ -z "$SPLASH" ] ; then + stage=6 + rundebugshell +fi +# }}} + +if [ -n "$BOOTDEBUG" ] ; then + CMDLINE="$(cat /proc/cmdline)" + [ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/*)" + einfo "Bootoption debug detected. Printing kernel command line:" + echo "$CMDLINE" +fi + +# {{{ Re-enable signals +trap 2 3 11 +# }}} + +exit 0 + +## END OF FILE ################################################################# +# vim:foldmethod=marker diff --git a/grml-bootsplash b/grml-bootsplash new file mode 100755 index 0000000..5e8341f --- /dev/null +++ b/grml-bootsplash @@ -0,0 +1,87 @@ +#!/bin/bash +# Filename: grml-bootsplash +# Purpose: simple text based bootsplash +# Authors: (c) Florian Keller , (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Son Jun 04 16:05:26 CEST 2006 [mika] +################################################################################ + +if [ -z "$1" ] ; then + STATUS='| not set ||' +else + STATUS="$1" # maximum: 12 '|' +fi + +COUNT=$(echo -n "$STATUS" | wc -c) + +if [ "$COUNT" -gt 12 ] ; then + COUNT=12 # more than 12 characters are not supported + STATUS="||||||||||||" +fi + +PLACEHOLDER="" +BOOTSPLASH=$(mktemp) + +/usr/bin/clear +cat > $BOOTSPLASH << 'EOTA' + + + + + .----------------. .----------------. .----------------. .----------------. +| .--------------. || .--------------. || .--------------. || .--------------. | +| | ______ | || | _______ | || | ____ ____ | || | _____ | | +| | .' ___ | | || | |_ __ \ | || ||_ \ / _|| || | |_ _| | | +| | / .' \_| | || | | |__) | | || | | \/ | | || | | | | | +| | | | ____ | || | | __ / | || | | |\ /| | | || | | | _ | | +| | \ `.___] _| | || | _| | \ \_ | || | _| |_\/_| |_ | || | _| |__/ | | | +| | `._____.' | || | |____| |___| | || ||_____||_____|| || | |________| | | +| | | || | | || | | || | | | +| '--------------' || '--------------' || '--------------' || '--------------' | + '----------------' '----------------' '----------------' '----------------' + + _______________________________________________________________________ + | | + | .''''. | + | _.-'/ | \ | + | , _.-" ,| / a `-. | + | |\ .-" `--""-.__.'==========================-, | + | \ '-'` .___.--._)==============================| | + | \ .' | | | + | | /,_.-' | Loading grml system ... | | + | _/ _.'( | (press alt+f1 to exit splash) | | + | / ,-' \ \ | | | +EOTA + + + +echo -n " | \ \ \`-' | 0% -[" >> $BOOTSPLASH +echo -en "$STATUS" >> $BOOTSPLASH + +COUNT=$(expr 13 - $COUNT) +for (( i=1 ; i < ${COUNT} ; i++ )); do + PLACEHOLDER="$PLACEHOLDER " +done + +echo -n "$PLACEHOLDER" >> $BOOTSPLASH +echo "]- 100% | |" >> $BOOTSPLASH + +cat >> $BOOTSPLASH << 'EOTA' + | `-' '-------------------------------' | + | | + | | + | | + |_______________________________________________________________________| + + + + + + +EOTA + +cat $BOOTSPLASH +rm -f $BOOTSPLASH &>/dev/null + +## END OF FILE ################################################################# diff --git a/language-functions b/language-functions new file mode 100644 index 0000000..3a2fc21 --- /dev/null +++ b/language-functions @@ -0,0 +1,815 @@ +# Filename: /etc/grml/language-functions +# Purpose: general language stuff used in several parts of the grml-system +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Sam Sep 23 18:46:39 CEST 2006 [mika] +################################################################################ + +# The default language/keyboard to use. This CAN NOT be autoprobed. +case "$LANGUAGE" in + at) + # Austrian version + COUNTRY="at" + LANG="de_AT@euro" + LANGUAGE="de_AT:de" + KEYTABLE="de-latin1-nodeadkeys" + XKEYBOARD="de" + KDEKEYBOARD="de" + CHARSET="iso8859-15" + KDEKEYBOARDS="us,fr" + TZ="Europe/Vienna" + ;; + at-utf8) + # Austrian version (UTF8) + COUNTRY="at" + LANG="de_AT.UTF-8" + LANGUAGE="de_AT:de" + KEYTABLE="de-latin1-nodeadkeys" + XKEYBOARD="de" + KDEKEYBOARD="de" + CHARSET="utf8" + # CHARSET="lat9w-16" + KDEKEYBOARDS="us,fr" + TZ="Europe/Vienna" + ;; + au) + # Australian version + LANGUAGE="en" + COUNTRY="au" + LANG="en_AU" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="iso8859-1" + # Additional KDE Keyboards + KDEKEYBOARDS="us,fr" + TZ="Australia/Sydney" + ;; + au-utf8) + # Australian version (UTF8) + LANGUAGE="en_AU:en" + COUNTRY="au" + LANG="en_AU.UTF-8" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,fr" + TZ="Australia/Sydney" + ;; + be) + # Belgian version + LANGUAGE="be" + COUNTRY="be" + LANG="C" + KEYTABLE="be2-latin1" + XKEYBOARD="be" + KDEKEYBOARD="be" + CHARSET="iso8859-15" + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Brussels" + ;; + be-utf8) + # Belgian version (UTF8) + LANGUAGE="be_BY:be" + COUNTRY="be" + LANG="be_BY.UTF-8" + KEYTABLE="be2-latin1" + XKEYBOARD="be" + KDEKEYBOARD="be" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Brussels" + ;; + bg) + # Bulgarian version + LANGUAGE="bg" + COUNTRY="bg" + LANG="bg_BG" + KEYTABLE="bg" + XKEYBOARD="bg" + KDEKEYBOARD="bg" + CHARSET="microsoft-cp1251" + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Sofia" + ;; + bg-utf8) + # Bulgarian version (UTF8) + LANGUAGE="bg_BG:bg" + COUNTRY="bg" + LANG="bg_BG.UTF-8" + KEYTABLE="bg" + XKEYBOARD="bg" + KDEKEYBOARD="bg" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Sofia" + ;; + br) + # Brazilian Version + LANGUAGE="pt_BR" + COUNTRY="br" + LANG="pt_BR" + KEYTABLE="br-abnt2" + XKEYBOARD="abnt2" + KDEKEYBOARD="br" + CHARSET="iso8859-1" + # Additional KDE Keyboards + KDEKEYBOARDS="us,br" + TZ="America/Sao_Paulo" + ;; + br-utf8) + # Brazilian Version (UTF8) + LANGUAGE="pt_BR:pt" + COUNTRY="br" + LANG="pt_BR.UTF-8" + KEYTABLE="br-abnt2" + XKEYBOARD="abnt2" + KDEKEYBOARD="br" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,br" + TZ="America/Sao_Paulo" + ;; + ch) + # Swiss version + LANGUAGE="de" + COUNTRY="ch" + LANG="de_CH" + KEYTABLE="sg-latin1" + XKEYBOARD="ch" + KDEKEYBOARD="ch" + CHARSET="iso8859-15" + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Zurich" + ;; + ch-utf8) + # Swiss version (basically de with some modifications) + LANGUAGE="de_CH:de" + COUNTRY="ch" + LANG="de_CH.UTF-8" + KEYTABLE="sg-latin1" + XKEYBOARD="de_CH" + KDEKEYBOARD="de_CH" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Zurich" + ;; + cf) + # French Canadian version + LANGUAGE="fr" + COUNTRY="ca" + LANG="fr_FR.ISO-8859-1" + KEYTABLE="cf" + CHARSET="iso8859-1" + CONSOLEFONT="lat1-16" + XKEYBOARD="ca_enhanced" + KDEKEYBOARD="ca_enhanced" + KDEKEYBOARDS="us" + TZ="AMERICA/MONTREAL" + ;; + cn) + # Simplified Chinese version + COUNTRY="cn" + LANG="zh_CN.GB2312" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="gb2312.1980-0" + KDEKEYBOARDS="us,de,fr" + XMODIFIERS="@im=Chinput" + TZ="Asia/Shanghai" + ;; + cn-utf8) + # Simplified Chinese version (UTF8) + COUNTRY="zh_CN:cn" + LANG="zh_CN.UTF-8" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,de,fr" + XMODIFIERS="@im=Chinput" + TZ="Asia/Shanghai" + ;; + cs|cz) + # Czech version + LANGUAGE="cs" + COUNTRY="cs" + LANG="cs_CZ" + KEYTABLE="cz-lat2" + XKEYBOARD="cs" + KDEKEYBOARD="cz" + CHARSET="iso8859-2" + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Prague" + CONSOLEFONT="Lat2-Terminus16" + CHARMAP="iso02" + ;; + cs-utf8|cz-utf8) + # Czech version (UTF8) + LANGUAGE="cs_CZ:cs" + COUNTRY="cs" + LANG="cs_CZ.UTF-8" + KEYTABLE="cz-lat2" + XKEYBOARD="cs" + KDEKEYBOARD="cs" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Prague" + CONSOLEFONT="iso02g" + ;; + de) + # German version + COUNTRY="de" + LANG="de_DE@euro" + LANGUAGE="de_DE:de" + KEYTABLE="de-latin1-nodeadkeys" + XKEYBOARD="de" + KDEKEYBOARD="de" + CHARSET="iso8859-15" + KDEKEYBOARDS="us,fr" + TZ="Europe/Berlin" + ;; + de-utf8) + # German version (UTF8) + COUNTRY="de" + LANG="de_DE.UTF-8" + LANGUAGE="de_DE:de" + KEYTABLE="de-latin1-nodeadkeys" + XKEYBOARD="de" + KDEKEYBOARD="de" + CHARSET="utf8" + # CHARSET="lat9w-16" + KDEKEYBOARDS="us,fr" + TZ="Europe/Berlin" + ;; + dk|da) + # Dansk version + COUNTRY="dk" + LANG="da_DK" + # Workaround: "dk" broken in gettext, use da:da_DK + LANGUAGE="da:da_DK" + # Keytable "dk" is correct. + KEYTABLE="dk" + XKEYBOARD="dk" + KDEKEYBOARD="dk" + CHARSET="iso8859-15" + KDEKEYBOARDS="dk,de,us,fr" + TZ="Europe/Copenhagen" + ;; + dk-utf8|da-utf8) + # Dansk version (UTF8) + COUNTRY="dk" + LANG="da_DK.UTF-8" + # Workaround: "dk" broken in gettext, use da:da_DK + LANGUAGE="da_DK:da" + # Keytable "dk" is correct. + KEYTABLE="dk" + XKEYBOARD="dk" + KDEKEYBOARD="dk" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="dk,de,us,fr" + TZ="Europe/Copenhagen" + ;; + en) + # English in Austria [see us + uk for american and english version!] + LANGUAGE="us" + COUNTRY="at" + LANG="en_US.iso885915" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="iso8859-15" + KDEKEYBOARDS="de,fr" + TZ="Europe/Vienna" + ;; + en-utf8) + # English in Austria [see us + uk for american and english version!] (UTF8) + LANGUAGE="us" + COUNTRY="at" + LANG="en_US.UTF-8" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="de,fr" + TZ="Europe/Vienna" + ;; + el) + # Greek version + LANGUAGE="el" + COUNTRY="gr" + LANG="el_GR" + KEYTABLE="gr" + XKEYBOARD="us,el" + KDEKEYBOARD="us" + CHARSET="iso8859-7" + CONSOLEFONT="iso07.f16" + IOCHARSET="8859-7" + IOCODEPAGE="737" + SYSFONTACM="iso07" + # Additional KDE Keyboards + KDEKEYBOARDS="el" + TZ="Europe/Athens" + ;; + el-utf8) + # Greek version (UTF8) + LANGUAGE="el_GR:el" + COUNTRY="gr" + LANG="el_GR.UTF-8" + KEYTABLE="gr-utf8" + XKEYBOARD="us,el" + KDEKEYBOARD="us" + CHARSET="utf8" + CONSOLEFONT="iso07.f16" + IOCHARSET="8859-7" + IOCODEPAGE="737" + SYSFONTACM="iso07" + # Additional KDE Keyboards + KDEKEYBOARDS="el" + TZ="Europe/Athens" + ;; + es) + # Spanish version + COUNTRY="es" + LANG="es_ES@euro" + KEYTABLE="es" + XKEYBOARD="es" + KDEKEYBOARD="es" + CHARSET="iso8859-15" + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Madrid" + ;; + es-utf8) + # Spanish version (UTF8) + LANGUAGE="es_ES:es" + COUNTRY="es" + LANG="es_ES.UTF-8" + KEYTABLE="es" + XKEYBOARD="es" + KDEKEYBOARD="es" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Madrid" + CONSOLEFONT="lat10-16" + ;; + fi) + # Finnish version + COUNTRY="fi" + LANG="fi_FI@euro" + KEYTABLE="fi-latin1" # old value: fi + XKEYBOARD="fi" + KDEKEYBOARD="fi" + CHARSET="iso8859-15" + KDEKEYBOARDS="se,us" + TZ="Europe/Helsinki" + ;; + fi-utf8) + # Finnish version (UTF8) + LANGUAGE="fi_FI:fi" + COUNTRY="fi" + LANG="fi_FI.UTF-8" + KEYTABLE="fi-latin1" + XKEYBOARD="fi" + KDEKEYBOARD="fi" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us" + TZ="Europe/Helsinki" + ;; + fr) + # French version + COUNTRY="fr" + LANG="fr_FR@euro" + KEYTABLE="fr" + XKEYBOARD="fr" + KDEKEYBOARD="fr" + CHARSET="iso8859-15" + KDEKEYBOARDS="de,us" + TZ="Europe/Paris" + ;; + fr-utf8) + # French version (UTF8) + LANGUAGE="fr_FR" + COUNTRY="fr" + LANG="fr_FR.UTF-8" + KEYTABLE="fr" + XKEYBOARD="fr" + KDEKEYBOARD="fr" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="de,us" + TZ="Europe/Paris" + ;; + ga) + # Irish Gaeilge version + COUNTRY="ie" + LANG="ga_IE@euro" + KEYTABLE="uk" + XKEYBOARD="uk" + KDEKEYBOARD="ie" + CHARSET="iso8859-15" + # Additional KDE Keyboards + KDEKEYBOARDS="gb,us,de,es,fr,it" + TZ="Europe/Dublin" + ;; + ga-utf8) + # Irish Gaeilge version (UTF8) + COUNTRY="ie" + LANG="ga_IE@UTF-8" + KEYTABLE="uk" + XKEYBOARD="uk" + KDEKEYBOARD="ie" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="gb,us,de,es,fr,it" + TZ="Europe/Dublin" + ;; + he|il) + # Hebrew version + LANGUAGE="he" + COUNTRY="il" + LANG="he_IL" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="il" + CHARSET="iso8859-8" + KDEKEYBOARDS="us,fr,de" + TZ="Asia/Jerusalem" + ;; + he-utf8|il-utf8) + # Hebrew version (UTF8) + LANGUAGE="he_IL:he" + COUNTRY="il" + LANG="he_IL.UTF-8" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="il" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,fr,de" + TZ="Asia/Jerusalem" + ;; + ie) + # Irish (English) version + COUNTRY="ie" + LANG="en_IE@euro" + KEYTABLE="uk" + XKEYBOARD="uk" + KDEKEYBOARD="gb" + CHARSET="iso8859-15" + KDEKEYBOARDS="us,de,es,fr,it" + TZ="Europe/Dublin" + ;; + ie-utf8) + # Irish (English) version (UTF8) + LANGUAGE="en_IE:en" + COUNTRY="ie" + LANG="en_IE.UTF-8" + KEYTABLE="uk" + XKEYBOARD="uk" + KDEKEYBOARD="ie" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="gb,us,de,es,fr,it" + TZ="Europe/Dublin" + ;; + it) + # Italian version + COUNTRY="it" + LANG="it_IT@euro" + KEYTABLE="it" + XKEYBOARD="it" + KDEKEYBOARD="it" + CHARSET="iso8859-15" + KDEKEYBOARDS="fr,us,de" + TZ="Europe/Rome" + ;; + it-utf8) + # Italian version (UTF8) + LANGUAGE="it_IT" + COUNTRY="it" + LANG="it_IT.UTF-8" + KEYTABLE="it" + XKEYBOARD="it" + KDEKEYBOARD="it" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="fr,us,de" + TZ="Europe/Rome" + ;; + ja) + # (limited) Japanese version + COUNTRY="jp" + LANG="ja_JP" + LANGUAGE="ja" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="iso8859-15" + KDEKEYBOARDS="fr,us,de" + TZ="Asia/Tokyo" + ;; + ja-utf8) + # (limited) Japanese version (UTF8) + LANGUAGE="ja_JP:ja" + COUNTRY="jp" + LANG="ja_JP.UTF-8" + LANGUAGE="ja" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="fr,us,de" + TZ="Asia/Tokyo" + ;; + nl) + # Dutch version + COUNTRY="nl" + LANG="nl_NL@euro" + KEYTABLE="us" # nl + XKEYBOARD="us" # nl + KDEKEYBOARD="en_US" # nl + CHARSET="iso8859-15" + KDEKEYBOARDS="nl,de,fr" + TZ="Europe/Amsterdam" + ;; + nl-utf8) + # Dutch version (UTF8) + LANGUAGE="nl_NL:nl" + COUNTRY="nl" + LANG="nl_NL.UTF-8" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="en_US" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="nl,de,fr" + TZ="Europe/Amsterdam" + ;; + pl) + # Polish version + COUNTRY="pl" + LANG="pl_PL" + KEYTABLE="pl" + XKEYBOARD="pl" + KDEKEYBOARD="pl" + CHARSET="iso8859-2" + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Warsaw" + CONSOLEFONT="Lat2-Terminus16" + CHARMAP="iso02" + ;; + pl-utf8) + # Polish version (UTF8) + LANGUAGE="pl_PL:pl" + COUNTRY="pl" + LANG="pl_PL.UTF-8" + KEYTABLE="pl" + XKEYBOARD="pl" + KDEKEYBOARD="pl" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Warsaw" + CONSOLEFONT="iso02g" + ;; + pt) + # Portuguese version + COUNTRY="pt" + LANG="pt_PT@euro" + KEYTABLE="pt-latin1" + XKEYBOARD="pt" + KDEKEYBOARD="pt" + CHARSET="iso8859-1" + # Additional KDE Keyboards + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Lisbon" + CONSOLEFONT="lat10-16" + ;; + pt-utf8) + # Portuguese version (UTF8) + LANGUAGE="pt_PT:pt" + COUNTRY="pt" + LANG="pt_PT.UTF-8" + KEYTABLE="pt-latin1" + XKEYBOARD="pt" + KDEKEYBOARD="pt" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Lisbon" + CONSOLEFONT="lat10-16" + ;; + ru) + # Russian version + COUNTRY="ru" + LANG="ru_RU.KOI8-R" + KEYTABLE="ru" + XKEYBOARD="ru" + KDEKEYBOARD="ru" + CHARSET="koi8-r" + CONSOLEFONT="Cyr_a8x16" + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Moscow" + ;; + ru-utf8) + # Russian version (UTF8) + LANGUAGE="ru_RU:ru" + COUNTRY="ru" + LANG="ru_RU.UTF-8" + KEYTABLE="ru" + XKEYBOARD="ru" + KDEKEYBOARD="ru" + CHARSET="utf8" + CONSOLEFONT="Cyr_a8x16" + # Additional KDE Keyboards + KDEKEYBOARDS="de,us,fr" + TZ="Europe/Moscow" + ;; + sk) + # Slovak version (guessed) + COUNTRY="sk" + LANG="sk" + KEYTABLE="sk-qwerty" + XKEYBOARD="sk" + KDEKEYBOARD="sk" + CHARSET="iso8859-2" + KDEKEYBOARDS="us,de" + TZ="Europe/Bratislava" + CONSOLEFONT="Lat2-Terminus16" + CHARMAP="iso02" + ;; + sk-utf8) + # Slovak version (guessed) (UTF8) + LANGUAGE="sk_SK:sk" + COUNTRY="sk" + LANG="sk_SK.UTF-8" + KEYTABLE="sk-qwerty" + XKEYBOARD="sk" + KDEKEYBOARD="sk" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,de" + TZ="Europe/Bratislava" + CONSOLEFONT="iso02g" + ;; + sl) + # Slovenian keyboard + LANGUAGE="sl" + COUNTRY="si" + LANG="sl_SI" + KEYTABLE="slovene" + XKEYBOARD="sl" + KDEKEYBOARD="si" + CHARSET="iso8859-2" + KDEKEYBOARDS="us,de" + TZ="Europe/Ljubljana" + CONSOLEFONT="Lat2-Terminus16" + CHARMAP="iso02" + ;; + sl-utf8) + # Slovenian keyboard (UTF8) + LANGUAGE="sl_SI:sl" + COUNTRY="si" + LANG="sl_SI.UTF-8" + KEYTABLE="slovene" + XKEYBOARD="sl" + KDEKEYBOARD="si" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,de" + TZ="Europe/Ljubljana" + CONSOLEFONT="iso02g" + ;; + tr) + # Turkish version (guessed) + COUNTRY="tr" + LANG="tr_TR" + KEYTABLE="tr_q-latin5" + XKEYBOARD="tr" + KDEKEYBOARD="tr" + CHARSET="iso8859-9" + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Istanbul" + ;; + tr-utf8) + # Turkish version (guessed) (UTF8) + LANGUAGE="tr_TR" + COUNTRY="tr" + LANG="tr_TR.UTF-8" + KEYTABLE="tr_q-latin5" + XKEYBOARD="tr" + KDEKEYBOARD="tr" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us,de,fr" + TZ="Europe/Istanbul" + ;; + tw) + # Traditional Chinese version + COUNTRY="tw" + LANG="zh_TW.Big5" + LANGUAGE="zh_TW.Big5" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + # CHARSET="big5-0" + CHARSET="iso8859-1" + KDEKEYBOARDS="us" + XMODIFIERS="@im=xcin" + TZ="Asia/Taipei" + ;; + tw-utf8) + # Traditional Chinese version (UTF8) + LANGUAGE="zh_TW:zh" + COUNTRY="tw" + LANG="zh_TW.UTF-8" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + # CHARSET="big5-0" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us" + XMODIFIERS="@im=xcin" + TZ="Asia/Taipei" + ;; + uk) + # British version + COUNTRY="uk" + LANG="en_GB" + LANGUAGE="en" + KEYTABLE="uk" + XKEYBOARD="uk" + KDEKEYBOARD="gb" + CHARSET="iso8859-1" + KDEKEYBOARDS="us" + TZ="Europe/London" + ;; + uk-utf8) + # British version (UTF8) + LANGUAGE="en_GB:en" + COUNTRY="uk" + LANG="en_GB.UTF-8" + KEYTABLE="uk" + XKEYBOARD="uk" + KDEKEYBOARD="gb" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="us" + TZ="Europe/London" + ;; + us) + # American version + LANGUAGE="en_US:en" + COUNTRY="us" + LANG="en_US.iso885915" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="en_US.iso885915" + # Additional KDE Keyboards + KDEKEYBOARDS="de,fr" + TZ="America/New_York" + ;; + us-utf8) + # American version (UTF8) + LANGUAGE="en_US:en" + COUNTRY="us" + LANG="en_US.UTF-8" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="utf8" + # Additional KDE Keyboards + KDEKEYBOARDS="de,fr" + TZ="America/New_York" + ;; + *) + # Default + LANGUAGE="us" + COUNTRY="at" + LANG="en_US.iso885915" + KEYTABLE="us" + XKEYBOARD="us" + KDEKEYBOARD="us" + CHARSET="iso8859-15" + KDEKEYBOARDS="de,fr" + TZ="Europe/Vienna" + ;; +esac + +## END OF FILE ################################################################# diff --git a/man/grml-autoconfig.8 b/man/grml-autoconfig.8 new file mode 100644 index 0000000..b57b395 --- /dev/null +++ b/man/grml-autoconfig.8 @@ -0,0 +1,76 @@ +.TH GRML-AUTOCONFIG 8 "June 4, 2006" +.SH NAME +grml-autoconfig \- script and configuration framework for the grml system +.SH SYNOPSIS +.B grml-autoconfig +.SH DESCRIPTION +This manual page documents briefly the +.B grml-autoconfig +command and the identically named framework. +.PP +\fBgrml-autoconfig\fP is an interface to the framework named grml-autoconfig. +/etc/init.d/grml-autoconfig is the main script of the grml-system where +all the hardware recognition and activation of services take place. + +grml-autoconfig supports an adjustable configuration via the configuration +file named /etc/grml/autoconfig. The script named \fBgrml-autoconfig\fP is +a simple dialog-based interface to the configuration file. You can either +use the script for configuring grml-autoconfig or modify the configuration +file manually on your own (there is no interference). + +The grml-autoconfig package creates three initscripts on installation: +/etc/init.d/bootlocal.first, /etc/init.d/bootlocal.middle and +/etc/init.d/bootlocal.last. + +They are created in the maintainer scripts of the grml-autoconfig package. +This means they are not part of the package itself and therefore also not +marked as configuration files of the package. As a result the files won't be +touched anymore, neither when upgrading nor when removing the package! If you +want to add your own bootup commands you can use these files. +/etc/init.d/bootlocal.first is executed at the very beginning, in runlevel 'S'. +/etc/init.d/bootlocal.middle is executed right before startup of +grml-autoconfig itself in runlevel '2' only (where grml-autoconfig is located +as well). Finally /etc/init.d/bootlocal.last is executed as one of the last +initscripts in runlevel '2' only. + +.SH OPTIONS +The program grml-autoconfig does not support any options but needs to be run +with root permissions as it modifies a system wide configuration file (/etc/grml/autoconfig). +.SH FILES +.I /etc/init.d/grml-autoconfig +.RS +Init-script which runs the commands defined in /etc/grml/autoconfig.functions +after checking configuration file /etc/grml/autoconfig. +.PP +.RE +.I /usr/sbin/grml-autoconfig +.RS +Dialog interface to the configuration file /etc/grml/autoconfig. +.PP +.RE +.I /etc/grml/autoconfig{.small} +.RS +Configuration file for grml-autoconfig framework. On grml-small the configuration +file is named /etc/grml/autoconfig.small. You can either edit this configuration +file manually of use the dialog interface /usr/sbin/grml-autoconfig. +.PP +.RE +.I /etc/grml/autoconfig.functions +.RS +Main functions of the grml-autoconfig. You do not need to configure or execute the file. +For debugging purposes you can source this script also from within an interactive +shell and run specific functions afterwards. +.PP +.RE +.I /etc/grml/lsb-functions +.RS +Based on /lib/lsb/init-functions this file provides an adjusted +version of an lsb-like booting sequence. +.SH BUGS +If you find a bug please report it. See http://grml.org/bugs/ +for details about bug reporting. +.SH AUTHOR +grml-autoconfig was written by Michael Prokop +.PP +This manual page was written by Michael Prokop , +for the grml project (but may be used by others). diff --git a/man/grml-bootsplash.1 b/man/grml-bootsplash.1 new file mode 100644 index 0000000..786b478 --- /dev/null +++ b/man/grml-bootsplash.1 @@ -0,0 +1,27 @@ +.TH GRML-BOOTSPLASH 1 "June 4, 2006" +.SH NAME +grml-bootsplash \- script and configuration framework for the grml system +.SH SYNOPSIS +.B grml-bootsplash "||..." +.SH DESCRIPTION +This manual page documents briefly the +.B grml-bootsplash +command. +.PP +\fBgrml-bootsplash\fP provides a text-based simple bootsplash. It is integrated within +the grml-autoconfig(8) framework. You very probably won't need it otherwise, this manpage just documents +what grml-bootsplash does. +.SH OPTIONS +The program grml-bootsplash does not support any options besides the "||..." sequence. +If you want to specify first status of bootsplash use 'grml-bootsplash "|"'. +To specify the last status of bootsplash use 'grml-bootsplash "||||||||||||"' (that's 12 '"'). +The maximum number of supported "|" signs is twelve and will be used automatically if more are specified. +.SH BUGS +If you find a bug please report it. See http://grml.org/bugs/ +for details about bug reporting. +.SH AUTHOR +grml-bootsplash was written by Michael Prokop and +Florian Keller . +.PP +This manual page was written by Michael Prokop , +for the grml project (but may be used by others). diff --git a/sbin/grml-autoconfig b/sbin/grml-autoconfig new file mode 100755 index 0000000..02a655f --- /dev/null +++ b/sbin/grml-autoconfig @@ -0,0 +1,112 @@ +#!/bin/sh +# Filename: grml-autoconfig +# Purpose: configuration interface for grml-autoconfig +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Die Sep 26 12:26:05 CEST 2006 [mika] +################################################################################ + +if [ "$UID" != 0 ]; then + echo "Error: please run this script with uid 0 (root)." ; exit 1 +fi + +LANG=C +LC_ALL=C +PN=`basename "$0"` +TMPFILE=`mktemp` + +grep -q small /etc/grml_version 2>/dev/null && AUTOCONFIG=/etc/grml/autoconfig.small || AUTOCONFIG=/etc/grml/autoconfig + +[ -r $AUTOCONFIG ] || exit 1 + +# helper functions +activate_value() +{ + sed -i "s/$1.*/$1='yes'/" $AUTOCONFIG +} + +deactivate_value() +{ + sed -i "s/$1.*/$1='no'/" $AUTOCONFIG +} + +check_setting() +{ + grep -q $* $TMPFILE && return 0 || return 1 +} + +check_current_state() +{ + grep -q '^CONFIG_DHCP=.*yes' $AUTOCONFIG && DHCPSTATUS=ON || DHCPSTATUS=OFF + grep -q '^CONFIG_ACPI_APM=.*yes' $AUTOCONFIG && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF + grep -q '^CONFIG_CPU=.*yes' $AUTOCONFIG && CPUSTATUS=ON || CPUSTATUS=OFF + grep -q '^CONFIG_SYSLOG=.*yes' $AUTOCONFIG && SYSLOGSTATUS=ON || SYSLOGSTATUS=OFF + grep -q '^CONFIG_GPM=.*yes' $AUTOCONFIG && GPMSTATUS=ON || GPMSTATUS=OFF + grep -q '^CONFIG_KERNEL=.*yes' $AUTOCONFIG && KERNELSTATUS=ON || KERNELSTATUS=OFF + grep -q '^CONFIG_FSTAB=.*yes' $AUTOCONFIG && FSTABSTATUS=ON || FSTABSTATUS=OFF + grep -q '^CONFIG_LANGUAGE=.*yes' $AUTOCONFIG && LANGUAGESTATUS=ON || LANGUAGESTATUS=OFF + grep -q '^CONFIG_DMA=.*yes' $AUTOCONFIG && DMASTATUS=ON || DMASTATUS=OFF + grep -q '^CONFIG_MIXER=.*yes' $AUTOCONFIG && MIXERSTATUS=ON || MIXERSTATUS=OFF +} + +# main program +interface() +{ + dialog --cr-wrap --clear --cancel-label "Exit" --title "$PN" --checklist "grml-autoconfig is the framework which includes hardware +detection, activation of system services and this is the +interface to activate or deactivate some features. + +If you do not know what to do at this stage just leave it untouched, +the defaults are the recommended values. + +All the configuration happens in the file /etc/grml/autoconfig - you can +edit it manually as well. +" 0 0 0 \ +dhcp "check for network devices and run pump (get ip-address via DHCP)" $DHCPSTATUS \ +acpi_apm "load ACPI/APM modules" $ACPI_APMSTATUS \ +cpufreq "activate cpydyn/powernowd for frequency-scalable CPUs" $CPUSTATUS \ +syslog "start syslog-ng" $SYSLOGSTATUS \ +gpm "start GPM (mouse on console)" $GPMSTATUS \ +kernel "display information on running kernel" $KERNELSTATUS \ +fstab "update /etc/fstab entries (check for devices)" $FSTABSTATUS \ +language "run loadkeys / consolechars" $LANGUAGESTATUS \ +dma "enable DMA for all IDE drives" $DMASTATUS \ +mixer "set audio volumes" $MIXERSTATUS \ + 2>$TMPFILE +} + +set_values() +{ + check_setting dhcp && activate_value CONFIG_DHCP || deactivate_value CONFIG_DHCP + check_setting acpi_apm && activate_value CONFIG_ACPI_APM || deactivate_value CONFIG_ACPI_APM + check_setting cpufreq && activate_value CONFIG_CPU || deactivate_value CONFIG_CPU + check_setting syslog && activate_value CONFIG_SYSLOG || deactivate_value CONFIG_SYSLOG + check_setting gpm && activate_value CONFIG_GPM || deactivate_value CONFIG_GPM + check_setting kernel && activate_value CONFIG_KERNEL || deactivate_value CONFIG_KERNEL + check_setting fstab && activate_value CONFIG_FSTAB || deactivate_value CONFIG_FSTAB + check_setting language && activate_value CONFIG_LANGUAGE || deactivate_value CONFIG_LANGUAGE + check_setting dma && activate_value CONFIG_DMA || deactivate_value CONFIG_DMA + check_setting mixer && activate_value CONFIG_MIXER || deactivate_value CONFIG_MIXER +} + +# and now run it: + check_current_state + interface + retval=$? + case $retval in + 0) + set_values && dialog --stdout --title "${PN}" --msgbox "Adjusting values via grml-autoconfig was successful!" 5 60 || \ + dialog --stdout --title "${PN}" --msgbox "There was an error adjusting values via grml-autoconfig. Sorry." 5 60 + rm -f $TMPFILE &>/dev/null + ;; + 1) + echo "Exit pressed." + ;; + 255) + echo "ESC pressed." + exit 1 + ;; + esac + +## END OF FILE ################################################################# -- 2.1.4