2 # EeePC Configuration restore
5 # Provides: eeepc-restore
6 # Short-Description: Restores EeePC settings from last boot.
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 [ -f /etc/sysconfig/eeepc-acpi ] && . /etc/sysconfig/eeepc-acpi
19 restart|reload|force-reload|start)
20 (grep EEEPC_MODEL /etc/default/eeepc-acpi >/dev/null 2>&1) || echo "EEEPC_MODEL=$(dmidecode -s system-product-name)" >> /etc/default/eeepc-acpi
22 (grep EEEPC_CPU /etc/default/eeepc-acpi >/dev/null 2>&1) || echo "EEEPC_CPU=`((grep Celeron /proc/cpuinfo >/dev/null 2>&1) && echo Celeron) || echo Atom`" >> /etc/default/eeepc-acpi
24 if [ "$BOOT_BLUETOOTH" = "1" ]; then
25 if [ -e "$EEEPC_VAR/bt_saved" ]; then
26 $EEEPC_PATH/eeepc-bluetooth-toggle.sh restore 2>/dev/null &
30 if [ "$BOOT_CAMERA" = "1" ]; then
31 if [ -e "$EEEPC_VAR/cam_saved" ]; then
32 $EEEPC_PATH/eeepc-camera-toggle.sh restore 2>/dev/null &
36 if [ "$BOOT_CPUFREQ" = "1" ]; then
37 if [ -e "$EEEPC_VAR/cpu_mode" ]; then
38 (sleep $BOOT_CPU_DELAY; $EEEPC_PATH/eeepc-cpu-control.sh restore 2>/dev/null) &
42 if [ "$BOOT_WIFI" = "1" ]; then
43 if [ -e "$EEEPC_VAR/eeepc-wifi-saved" ]; then
44 $EEEPC_PATH/eeepc-wifi-toggle.sh restore 2>/dev/null &
51 if [ "$BOOT_TOUCHPAD" = "1" ]; then
52 if [ -e "$EEEPC_VAR/touchpad_saved" ]; then
53 $EEEPC_PATH/eeepc-touchpad-toggle.sh restore 2>/dev/null &
57 if [ "$BOOT_VGA" = "1" ]; then
58 if [ -e "$EEEPC_VAR/vga_saved" ]; then
59 $EEEPC_PATH/eeepc-vga-toggle.sh restore 2>/dev/null &
63 if [ "$BOOT_ROTATION" = "1" ]; then
64 if [ -e "$EEEPC_VAR/rotation_saved" ]; then
65 $EEEPC_PATH/eeepc-rotate-lvds.sh restore 2>/dev/null &
69 if [ "$BOOT_RESOLUTION" = "1" ]; then
70 if [ -e "$EEEPC_VAR/resolution_saved" ] ; then
71 $EEEPC_PATH/eeepc-lvds-resolution-toggle.sh restore 2>/dev/null &