slitaz-boot-scripts rev 29
Add option: laptop (load modules: ac battery)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Feb 23 01:56:34 2008 +0100 (2008-02-23) |
parents | f34a92a12c88 |
children | 637353cad5a5 |
files | etc/init.d/bootopts.sh etc/rcS.conf |
line diff
1.1 --- a/etc/init.d/bootopts.sh Sat Feb 23 01:42:47 2008 +0100 1.2 +++ b/etc/init.d/bootopts.sh Sat Feb 23 01:56:34 2008 +0100 1.3 @@ -93,3 +93,13 @@ 1.4 fi 1.5 fi 1.6 1.7 +# Laptop option to load ac and battery Kernel modules. 1.8 +if grep -q "laptop" /proc/cmdline; then 1.9 + echo -n "Laptop modules: ac battery..." 1.10 + . /etc/rcS.conf 1.11 + sed -i s/"LOAD_MODULES=\"$LOAD_MODULES\""/"LOAD_MODULES=\"$LOAD_MODULES ac battery\""/\ 1.12 + /etc/rcS.conf 1.13 + status 1.14 + modprobe ac 1.15 + modprobe battery 1.16 +fi
2.1 --- a/etc/rcS.conf Sat Feb 23 01:42:47 2008 +0100 2.2 +++ b/etc/rcS.conf Sat Feb 23 01:56:34 2008 +0100 2.3 @@ -33,7 +33,7 @@ 2.4 # Daemons to start at boot time. SliTaz provide only a few daemons, firewall, 2.5 # Web server (lighttpd), SSH server (dropbear) and rsyncd, so boot order is 2.6 # not realy important. 2.7 -RUN_DAEMONS="firewall lighttpd" 2.8 +RUN_DAEMONS="slim firewall lighttpd" 2.9 2.10 # Pre login bold message. 2.11 MESSAGE="Welcome to your box."