SOURCES: eeepc-acpi-utilities.init (NEW) - init script with PLD paths

paszczus paszczus at pld-linux.org
Fri Jan 9 20:31:50 CET 2009


Author: paszczus                     Date: Fri Jan  9 19:31:50 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- init script with PLD paths

---- Files affected:
SOURCES:
   eeepc-acpi-utilities.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/eeepc-acpi-utilities.init
diff -u /dev/null SOURCES/eeepc-acpi-utilities.init:1.1
--- /dev/null	Fri Jan  9 20:31:51 2009
+++ SOURCES/eeepc-acpi-utilities.init	Fri Jan  9 20:31:44 2009
@@ -0,0 +1,79 @@
+#!/bin/sh
+# EeePC Configuration restore
+#
+### BEGIN INIT INFO
+# Provides:          eeepc-restore
+# Short-Description: Restores EeePC settings from last boot.
+# chkconfig:	234
+### END INIT INFO
+
+set -e
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f . /etc/sysconfig/eeepc-acpi ] && . /etc/sysconfig/eeepc-acpi
+
+case "$1" in
+restart|reload|force-reload|start)
+  (grep EEEPC_MODEL /etc/default/eeepc-acpi >/dev/null 2>&1) || echo "EEEPC_MODEL=$(dmidecode -s system-product-name)" >> /etc/default/eeepc-acpi
+
+  (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
+
+  if [ "$BOOT_BLUETOOTH" = "1" ]; then
+    if [ -e "$EEEPC_VAR/bt_saved" ]; then
+      $EEEPC_PATH/eeepc-bluetooth-toggle.sh restore 2>/dev/null &
+    fi
+  fi
+
+  if [ "$BOOT_CAMERA" = "1" ]; then
+    if [ -e "$EEEPC_VAR/cam_saved" ]; then
+      $EEEPC_PATH/eeepc-camera-toggle.sh restore 2>/dev/null &
+    fi
+  fi
+
+  if [ "$BOOT_CPUFREQ" = "1" ]; then
+    if [ -e "$EEEPC_VAR/cpu_mode" ]; then
+      (sleep $BOOT_CPU_DELAY; $EEEPC_PATH/eeepc-cpu-control.sh restore 2>/dev/null) &
+    fi
+  fi
+
+  if [ "$BOOT_WIFI" = "1" ]; then
+    if [ -e "$EEEPC_VAR/eeepc-wifi-saved" ]; then
+      $EEEPC_PATH/eeepc-wifi-toggle.sh restore 2>/dev/null &
+    fi
+  fi
+  ;;
+
+client)
+
+  if [ "$BOOT_TOUCHPAD" = "1" ]; then
+    if [ -e "$EEEPC_VAR/touchpad_saved" ]; then
+      $EEEPC_PATH/eeepc-touchpad-toggle.sh restore 2>/dev/null &
+    fi
+  fi
+
+  if [ "$BOOT_VGA" = "1" ]; then
+    if [ -e "$EEEPC_VAR/vga_saved" ]; then
+      $EEEPC_PATH/eeepc-vga-toggle.sh restore 2>/dev/null &
+    fi
+  fi
+
+  if [ "$BOOT_ROTATION" = "1" ]; then
+    if [ -e "$EEEPC_VAR/rotation_saved" ]; then
+      $EEEPC_PATH/eeepc-rotate-lvds.sh restore 2>/dev/null &
+    fi
+  fi
+
+  if [ "$BOOT_RESOLUTION" = "1" ]; then
+    if [ -e "$EEEPC_VAR/resolution_saved" ] ; then
+      $EEEPC_PATH/eeepc-lvds-resolution-toggle.sh restore 2>/dev/null &
+    fi
+  fi
+  ;;
+stop)
+  ;;
+esac
+
+exit 0
================================================================


More information about the pld-cvs-commit mailing list