[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.0-beta.1-30-g3ec490d
Raphael Geissert
atomo64 at gmail.com
Thu Jul 9 05:25:47 UTC 2009
The following commit has been merged in the master branch:
commit 4bcd8112c74eaab0ca2b4726d57b2fadfb213ba7
Author: Raphael Geissert <atomo64 at gmail.com>
Date: Thu Jul 9 00:03:01 2009 -0500
Simplify the script's logic by avoiding large conditional blocks
diff --git a/etc/acpi/lib/notify.sh b/etc/acpi/lib/notify.sh
index dea99c9..968c2a4 100644
--- a/etc/acpi/lib/notify.sh
+++ b/etc/acpi/lib/notify.sh
@@ -10,13 +10,18 @@ notify() {
return 1
fi
echo "$MSG" # for /var/log/acpid
- if [ -S /tmp/.X11-unix/X0 ]; then
- detect_x_display
+
+ if [ ! -S /tmp/.X11-unix/X0 ]; then
+ echo "$MSG" > /dev/console
+ return
+ fi
if [ "x$ENABLE_OSD" = "xno" ]; then
return
fi
+ detect_x_display
+
OSD_SHOWN=
# try to show a nice OSD notification via GNOME OSD service
@@ -54,8 +59,5 @@ notify() {
OSD_SHOWN=1
fi
- else
- echo "$MSG" > /dev/console
- fi
}
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list