summarylogtreecommitdiffstats
path: root/acpi-eeepc-generic.install
diff options
context:
space:
mode:
authorAndré Fettouhi2015-10-31 19:22:05 +0100
committerAndré Fettouhi2015-10-31 19:22:05 +0100
commit4e2883b63c51873f7b913d93003f888179e0175f (patch)
tree1454836ec6f40467b8e7ffa7efd4961486f9c541 /acpi-eeepc-generic.install
downloadaur-4e2883b63c51873f7b913d93003f888179e0175f.tar.gz
Initial import
Diffstat (limited to 'acpi-eeepc-generic.install')
-rw-r--r--acpi-eeepc-generic.install41
1 files changed, 41 insertions, 0 deletions
diff --git a/acpi-eeepc-generic.install b/acpi-eeepc-generic.install
new file mode 100644
index 000000000000..25c3ad733baa
--- /dev/null
+++ b/acpi-eeepc-generic.install
@@ -0,0 +1,41 @@
+post_install() {
+
+ # Disable "acpid" events handling
+ [ -e /etc/acpi/events/anything ] && \
+ sed -i 's/^[^#]/#&/' /etc/acpi/events/anything
+
+ # Detect if model is not supported
+ eeepc_model=`dmidecode -s system-product-name`
+ if [[ ! -e "/etc/acpi/eeepc/models/acpi-eeepc-${eeepc_model}-events.conf" ]]; then
+ echo ">>> You're model ${eeepc_model} is not (yet) supported."
+ echo ">>> Please report it to http://github.com/nbigaouette/acpi-eeepc-generic/issues"
+ fi
+
+ #echo ">>> "
+
+ # Get the model and save it to the configuration file
+ . /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
+ get_model
+
+ echo " "
+ echo ">>> Configuration is done via /etc/conf.d/acpi-eeepc-generic.conf"
+ echo ">>> Note that you will have to COMMENT-out the 'EEEPC_CONF_DONE' option."
+ echo ">>> Else you will receive an error/warning when hitting a special key!"
+ echo " "
+ echo ">>> Please restart acpid to reload actions."
+ echo "# /etc/rc.d/acpid restart"
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ echo " "
+ echo ">>> Note that the file /etc/acpi/handler.sh is now the default."
+ [ -e /etc/acpi/events/anything ] && \
+ sed -e 's/#event/event/g' -e 's/#action/action/g' -i /etc/acpi/events/anything
+ echo ">>> Please restart acpid to reload actions."
+ echo "# /etc/rc.d/acpid restart"
+}
+