slitaz-boot-scripts rev 182
set netbook resolution + batt for laptop
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 09 21:16:17 2009 +0100 (2009-11-09) |
parents | 16c27ed1f2c9 |
children | 599ec52ec156 |
files | etc/init.d/bootopts.sh etc/init.d/hwconf.sh |
line diff
1.1 --- a/etc/init.d/bootopts.sh Sat Oct 24 12:29:17 2009 +0000 1.2 +++ b/etc/init.d/bootopts.sh Mon Nov 09 21:16:17 2009 +0100 1.3 @@ -140,6 +140,9 @@ 1.4 do 1.5 modprobe $mod 1.6 done 1.7 + grep -qs batt /etc/lxpanel/default/panels/panel || 1.8 + sed -i 's/= cpu/= batt\n}\n\nPlugin {\n type = cpu/' \ 1.9 + /etc/lxpanel/default/panels/panel 2> /dev/null 1.10 # Enable Kernel Laptop mode. 1.11 echo "5" > /proc/sys/vm/laptop_mode ;; 1.12 mount)
2.1 --- a/etc/init.d/hwconf.sh Sat Oct 24 12:29:17 2009 +0000 2.2 +++ b/etc/init.d/hwconf.sh Mon Nov 09 21:16:17 2009 +0100 2.3 @@ -87,6 +87,14 @@ 2.4 awk '{ printf "%s %s\n",$2 }' \ 2.5 | sort -nr | grep x[1-2][4-6] | head -n 1` 2.6 tazx `cat /etc/X11/wm.default` ;; 2.7 + 1024x600*|800x480*) 2.8 + set -- $(echo $SCREEN | sed 's/x/ /g') 2.9 + 915resolution -l 2>/dev/null | \ 2.10 + grep " ${1}x" | awk -v h=$1 -v v=$2 \ 2.11 + 'END {system("915resolution " $2 " " h " " v)}' 2.12 + # Use specified screen resolution. 2.13 + export NEW_SCREEN=$SCREEN 2.14 + tazx `cat /etc/X11/wm.default` ;; 2.15 *) 2.16 # Use specified screen resolution. 2.17 export NEW_SCREEN=$SCREEN