xorg: Changes to 'debian-unstable'
debian/changelog | 2 ++
debian/control | 2 +-
debian/xserver-xorg.postinst.in | 17 ++++++++++++++++-
3 files changed, 19 insertions(+), 2 deletions(-)
New commits:
commit e4d5a2aa626bdae31cbbd0095719adcfde89b8a0
Author: Julien Cristau <jcristau@debian.org>
Date: Fri Aug 12 12:56:16 2011 +0200
Use dbus activation to restart hal on kfreebsd, its init script is gone
Closes: #624398
diff --git a/debian/changelog b/debian/changelog
index 24db1a3..35ba425 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ xorg (1:7.6+8) UNRELEASED; urgency=low
* Add Provides: xserver to xserver-xorg.
* Add Serbian cyrillic and Serbian latin debconf translations (closes:
#635009, #635016). Thanks, Zlatan Todoric!
+ * Use dbus activation to restart hal on kfreebsd, its init script is gone
+ (closes: #624398).
-- Julien Cristau <jcristau@debian.org> Mon, 01 Aug 2011 01:23:42 +0200
diff --git a/debian/control b/debian/control
index e0fc96c..20d09b4 100644
--- a/debian/control
+++ b/debian/control
@@ -35,7 +35,7 @@ Depends:
xserver-xorg-video-all | xorg-driver-video,
xserver-xorg-input-all | xorg-driver-input,
xserver-xorg-input-evdev [linux-any],
- hal (>= 0.5.12~git20090406) [kfreebsd-any],
+ hal (>= 0.5.14-4~) [kfreebsd-any],
${shlibs:Depends},
${misc:Depends},
xkb-data (>= 1.4),
diff --git a/debian/xserver-xorg.postinst.in b/debian/xserver-xorg.postinst.in
index 5b38145..e595e94 100644
--- a/debian/xserver-xorg.postinst.in
+++ b/debian/xserver-xorg.postinst.in
@@ -137,6 +137,21 @@ if dpkg --compare-versions "$2" lt-nl "1:7.4~3"; then
fi
fi
+get_hal_pid() {
+ dbus-send --system --dest=org.freedesktop.DBus --print-reply \
+ /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
+ string:org.freedesktop.Hal 2>/dev/null | awk '/uint32/ {print $2}'
+}
+
+restart_hal() {
+ # restart hald if it was running before
+ pid=$(get_hal_pid)
+ if [ -n "$pid" ]; then
+ kill $pid 2>/dev/null || true
+ lshal >/dev/null || true # will trigger through D-Bus activation
+ fi
+}
+
case "$1" in
configure)
if dpkg --compare-versions "$2" lt-nl "1:7.3+11"; then
@@ -147,7 +162,7 @@ case "$1" in
fi
if dpkg --compare-versions "$2" lt "1:7.5~3"; then
if [ `uname -s` = "GNU/kFreeBSD" ]; then
- invoke-rc.d hal restart >/dev/null
+ restart_hal
fi
fi
;;
Reply to: