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 [[ `grep -c processor /proc/cpuinfo` -gt 1 ]] ; then
+ einfo "Detecting CPU:"
+ CPU=$(awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG)
+ echo $CPU | sed 's/ \{1,\}/ /g'
+ eend 0
+ else
+ einfo "Detecting CPU: `awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG` " ; eend 0
+ fi
if /usr/sbin/laptop-detect ; then
einfo "Detected Laptop - trying to use cpu frequency scaling:"
# loadcpumod() {
amixer set Front 0% 1>/dev/null
fi
fi
- aumix -w 0 -v 0 -p 0 -m 0 ; eend $?
+ ERROR=$(aumix -w 0 -v 0 -p 0 -m 0 2>&1) ; RC=$?
+ if [ -n "$ERROR" ] ; then
+ eindent
+ eerror "Problem muting sound devices: $ERROR"
+ eoutdent
+ fi
+ eend $RC
elif [ -z "$INSTALLED" ]; then
einfo "Setting mixer volumes to level ${WHITE}${VOL}${NORMAL}."
# some IBM notebooks require the following stuff:
amixer set Front ${VOL}% 1>/dev/null
fi
fi
- aumix -w $VOL -v $VOL -p $VOL -m $VOL ; eend $?
+ ERROR=$(aumix -w $VOL -v $VOL -p $VOL -m $VOL 2>&1) ; RC=$?
+ if [ -n "$ERROR" ] ; then
+ eindent
+ eerror "Problem setting mixer volumes: $ERROR"
+ eoutdent
+ fi
+ eend $RC
fi
fi
config_debs(){
if checkbootparam "debs" ; then
DEBS="$(getbootparam 'debs' 2>>$DEBUG)"
- [ -z "$CONFIG" ] && CONFIG="/cdrom/debs/*"
- einfo "Tring to install debian package(s) ${DEBS}:"
+ einfo "Tring to install debian package(s) ${DEBS}"
dpkg -i /cdrom/debs/$DEBS* ; eend $?
fi
}