summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-03-12 02:25:07 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-03-12 02:25:07 -0500
commit6a4e2466e6fb91d060c2d94717abd9922f624d35 (patch)
tree20f6d8393a57820f78e6adeb223ee0b2d8314033 /packaging
parent5fa86c5e80710f5a89c87be0b5d5b17d72e85c14 (diff)
initialize msva in Xsession based on monkeysphere.conf instead of /etc/X11/Xsession.d
Diffstat (limited to 'packaging')
-rw-r--r--packaging/debian/70monkeysphere_use_validation_agent23
1 files changed, 15 insertions, 8 deletions
diff --git a/packaging/debian/70monkeysphere_use_validation_agent b/packaging/debian/70monkeysphere_use_validation_agent
index 1390859..7c7a030 100644
--- a/packaging/debian/70monkeysphere_use_validation_agent
+++ b/packaging/debian/70monkeysphere_use_validation_agent
@@ -4,9 +4,9 @@
# startup argument with a monkeysphere-validation-agent nested
# process, if available and none already exist.
-# Enable this system-wide by adding a line to
-# /etc/X11/Xsession.options that reads:
-# use-monkeysphere-validation-agent
+# Enable this system-wide by setting
+# MONKEYSPHERE_USE_VALIDATION_AGENT=true in
+# /etc/monkeysphere/monkeysphere.conf
# Note that there is some weird interaction between this and
# dbus-session at the moment: dbus-launch can start the msva just
@@ -22,9 +22,16 @@
STARTMSVA=
MSVAGENT=/usr/bin/monkeysphere-validation-agent
-
-if grep -qs ^use-monkeysphere-validation-agent "$OPTIONFILE"; then
- if [ -x "$MSVAGENT" ] && [ -z "$MONKEYSPHERE_VALIDATION_AGENT_SOCKET" ]; then
- STARTUP="$MSVAGENT $STARTUP"
- fi
+MSSYSCONFIG=/etc/monkeysphere/monkeysphere.conf
+MSUSERCONFIG="$HOME/.monkeysphere/monkeysphere.conf"
+
+if [ -x "$MSVAGENT" ] ; then
+ USEMSVAGENT=$(sh -c "
+. '$MSSYSCONFIG' 2>/dev/null
+. '$MSUSERCONFIG' 2>/dev/null || :
+printf '%s' "'"$MONKEYSPHERE_USE_VALIDATION_AGENT"')
+
+ if [ "$USEMSVAGENT" == "true" ] ; then
+ STARTUP="$MSVAGENT $STARTUP"
+ fi
fi