Change behavior of printing settings
[wmlaptop2.git] / .info
blob1fbec21800981a91a1d917729553a20acc2e31ae
1 #!/bin/bash
4 echo
5 echo wmlaptop2 is now installed on your system
6 echo type wmlaptop2 --help for a details on its functions
7 echo
9 cd /sys/devices/system/cpu/cpu0/cpufreq >& /dev/null
11 if [ $? -eq 0 ]; then
13         GOV=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
15         if [ "$GOV" != "ondemand" ]; then
17                 echo
18                 echo It seems you have kernel 2.6 series but you are
19                 echo not using the \"ondemand\" scaling governor. Enable it
20                 echo or wmlaptop2 will not work.
21                 echo
22                 
23                 POS=`grep userspace /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors &> /dev/null`
24                 FOUND=$?
26                 if [ $FOUND -eq 0 ]; then
27                         echo You can do this by typing:
28                         echo "echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
29                         echo BEFORE starting wmlaptop2.
30                         echo
31                 else
32                         echo WARNING: you don\'t seem to have \"ondemand governor\" available
33                         echo on this kernel configuration. If you have built it as a module, 
34             echo load it before starting wmlaptop2. If you didn\'t build it, maybe you
35             echo need to recompile the kernel.
36                         echo
37                 fi
38         fi
41 which sudo >& /dev/null
43 if [ $? -eq 0 ]; then
45         echo
46         echo To enable wmlaptop2 to call /bin/shutdown as normal user, you have to
47         echo tell to sudo that a normal user can run the shutdown binary.
48         echo
49         echo You can do this by adding this line to /etc/sudoers file:
50         echo myLoginName ALL=\(root\) NOPASSWD: /sbin/shutdown
51         echo
52         echo where myLoginName is the normal user login name.
53         echo
54 else
55         echo
56         echo You don\'t seem to have sudo on your path. Read the README file to 
57         echo understand who to use the auto shutdown with wmlaptop2
58         echo