installer.kmdr: fix LXDE reboot calling ConsoleKit via D-Bus

This commit is contained in:
Silvan Calarco 2012-07-28 15:22:05 +02:00
parent cf117d60bf
commit 3c6705af0f

View File

@ -1506,10 +1506,14 @@ done
@setGlobal("rebootquest",(@Message.question(@i18n("Partition table on at least one device is missing or has been recreated; reboot may be needed. If you choose to continue you may have data consistency errors."), @i18n("Reboot needed"), @i18n("Reboot"), @i18n("Continue"))))
@endif
@if (@global("rebootquest") == "1")
if [ -x /usr/bin/qdbus ]; then
/usr/bin/qdbus org.kde.ksmserver /KSMServer logout 0 1 2
if [ "$DESKTOP_SESSION" == "gnome" -o "$DESKTOP_SESSION" == "GNOME" ]; then
gnome-session-save --shutdown-dialog
elif [ "$DESKTOP_SESSION" == "lxde" -o "$DESKTOP_SESSION" == "LXDE" ]; then
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit \
/org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
else
dcop ksmserver ksmserver logout 0 1 1
# assume KDE4 as default (or use KDE_FULL_SESSION == true)
/usr/bin/qdbus org.kde.ksmserver /KSMServer logout 0 1 2
fi
@endif
</string>
@ -3469,7 +3473,8 @@ fi
<string>if [ "$DESKTOP_SESSION" == "gnome" -o "$DESKTOP_SESSION" == "GNOME" ]; then
gnome-session-save --shutdown-dialog
elif [ "$DESKTOP_SESSION" == "lxde" -o "$DESKTOP_SESSION" == "LXDE" ]; then
shutdown now -r
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit \
/org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
else
# assume KDE4 as default (or use KDE_FULL_SESSION == true)
/usr/bin/qdbus org.kde.ksmserver /KSMServer logout 0 1 2