# Authors: grml-team (grml.org), (c) Klaus Knopper <knopper@knopper.net>, (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Son Sep 30 14:15:11 CEST 2007 [mika]
+# Latest change: Don Dez 27 23:58:27 CET 2007 [mika]
################################################################################
# {{{ path, variables, signals, umask, zsh
fi
# we have to set up all consoles, therefore loop it over all ttys:
- NUM_CONSOLES=`fgconsole --next-available`
- NUM_CONSOLES=`expr ${NUM_CONSOLES} - 1`
+ NUM_CONSOLES=$(fgconsole --next-available)
+ NUM_CONSOLES=$(expr ${NUM_CONSOLES} - 1)
[ ${NUM_CONSOLES} -eq 1 ] && NUM_CONSOLES=6
+ CUR_CONSOLE=$(fgconsole)
+
if [ -n "$CHARMAP" ] ; then
einfo "Running consolechars for ${CHARMAP}"
for vc in `seq 0 ${NUM_CONSOLES}` ; do
consolechars --tty=/dev/tty${vc} -m ${CHARMAP} ; RC=$?
done
+ [ -n "$CUR_CONSOLE" ] && chvt $CUR_CONSOLE
eend $RC
fi
- if [ -n "$CONSOLEFONT" ] ; then
- einfo "Running consolechars using ${CONSOLEFONT}"
- for vc in `seq 0 ${NUM_CONSOLES}` ; do
- consolechars --tty=/dev/tty${vc} -f $CONSOLEFONT || consolechars --tty=/dev/tty${vc} -d
- done
- eend $?
+
+ if checkbootparam noconsolefont ; then
+ ewarn "Skipping setting console font as requested on boot commandline." ; eend 0
+ else
+ if [ -n "$CONSOLEFONT" ] ; then
+ einfo "Running consolechars using ${CONSOLEFONT}"
+ for vc in `seq 0 ${NUM_CONSOLES}` ; do
+ consolechars --tty=/dev/tty${vc} -f $CONSOLEFONT ; RC=$?
+ done
+ [ -n "$CUR_CONSOLE" ] && chvt $CUR_CONSOLE
+ eend $?
+ fi
fi
eoutdent
else
if [ -z "$INSTALLED" ] ; then
if vmware-detect || stringinstring "BOOT_IMAGE=vmware " "$CMDLINE" ; then
- if ! checkbootparam qemu ; then
+ if ! checkbootparam qemu ; then
if [ -r /etc/X11/xorg.conf.vmware ] ; then
einfo "VMware: Copying /etc/X11/xorg.conf.vmware to /etc/X11/xorg.conf"
cp /etc/X11/xorg.conf.vmware /etc/X11/xorg.conf ; eend $?
fi
fi
+ elif [ -r /proc/acpi/battery/BAT0/info -a -r /etc/X11/xorg.conf.virtualbox ] ; then
+ if grep -q 'OEM info: innotek' /proc/acpi/battery/BAT0/info ; then
+ einfo 'Virtual Box: Copying /etc/X11/xorg.conf.virtualbox to /etc/X11/xorg.conf'
+ cp /etc/X11/xorg.conf.virtualbox /etc/X11/xorg.conf ; eend $?
+ fi
fi
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:
else
ewarn "(none)" ; eend 1
fi
- if ! [ -S /var/run/acpid.socket ] ; then
+ if ! ps x | grep -q /usr/sbin/acpid ; then
if ! [ -r /var/run/dbus/pid ] ; then
einfo "Starting acpi daemon."
/etc/init.d/acpid start 1>>$DEBUG 2>&1 ; eend $?
amixer set Front ${VOL}% 1>/dev/null
fi
fi
- ERROR=$(aumix -w $VOL -v $VOL -p $VOL -m $VOL 2>&1) ; RC=$?
+ # by default assume '0' as volume for microphone:
+ if checkbootparam micvol ; then
+ MICVOL="$(getbootparam 'micvol' 2>>$DEBUG)"
+ else
+ MICVOL=0
+ fi
+
+ # finally set the volumes:
+ ERROR=$(aumix -w $VOL -v $VOL -p $VOL -m $MICVOL 2>&1) ; RC=$?
if [ -n "$ERROR" ] ; then
eindent
eerror "Problem setting mixer volumes: $ERROR (no soundcard?)"