updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / acpi-eeepc-generic-svn / acpi-eeepc-generic-restore.rcd
blob303534cdfb144e41288eb6ce969ed7549c0408cb
1 #!/bin/sh
2 # EeePC Configuration restore
4 ### BEGIN INIT INFO
5 # Provides: eeepc-restore
6 # Default-Start: 2 3 4
7 # Default-Stop: 1 5
8 # Required-Start:
9 # Required-Stop:
10 # Short-Description: Restores EeePC settings from last boot.
11 ### END INIT INFO
13 . /etc/rc.conf
14 . /etc/rc.d/functions
15 . /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
16 . /etc/conf.d/acpi-eeepc-generic.conf
18 set -e
20 get_model
22 case "$1" in
23 restart|reload|force-reload|start)
24 stat_busy "Restore eeepc-acpi configuration"
26 if [ "$BOOT_BLUETOOTH" = "1" ]; then
27 if [ -e "$EEEPC_VAR/bt_saved" ]; then
28 $EEEPC_PATH/eeepc-bluetooth-toggle.sh restore 2>/dev/null &
32 if [ "$BOOT_CAMERA" = "1" ]; then
33 if [ -e "$EEEPC_VAR/cam_saved" ]; then
34 $EEEPC_PATH/eeepc-camera-toggle.sh restore 2>/dev/null &
38 if [ "$BOOT_CPUFREQ" = "1" ]; then
39 if [ -e "$EEEPC_VAR/cpu_mode" ]; then
40 (sleep $BOOT_CPU_DELAY; $EEEPC_PATH/eeepc-cpu-control.sh restore 2>/dev/null) &
44 if [ "$BOOT_WIFI" = "1" ]; then
45 if [ -e "$EEEPC_VAR/eeepc-wifi-saved" ]; then
46 $EEEPC_PATH/eeepc-wifi-toggle.sh restore 2>/dev/null &
49 stat_done
52 client)
54 stat_busy "Restore eeepc-acpi configuration"
56 if [ "$BOOT_TOUCHPAD" = "1" ]; then
57 if [ -e "$EEEPC_VAR/touchpad_saved" ]; then
58 $EEEPC_PATH/eeepc-touchpad-toggle.sh restore 2>/dev/null &
62 if [ "$BOOT_VGA" = "1" ]; then
63 if [ -e "$EEEPC_VAR/vga_saved" ]; then
64 $EEEPC_PATH/eeepc-vga-toggle.sh restore 2>/dev/null &
68 if [ "$BOOT_ROTATION" = "1" ]; then
69 if [ -e "$EEEPC_VAR/rotation_saved" ]; then
70 $EEEPC_PATH/eeepc-rotate-lvds.sh restore 2>/dev/null &
74 if [ "$BOOT_RESOLUTION" = "1" ]; then
75 if [ -e "$EEEPC_VAR/resolution_saved" ] ; then
76 $EEEPC_PATH/eeepc-lvds-resolution-toggle.sh restore 2>/dev/null &
79 stat_done
81 stop)
83 esac
85 exit 0