summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpackaging/debian/monkeysphere.postinst3
-rw-r--r--src/share/common2
-rwxr-xr-xsrc/transition_0.22_0.2326
3 files changed, 25 insertions, 6 deletions
diff --git a/packaging/debian/monkeysphere.postinst b/packaging/debian/monkeysphere.postinst
index 8e79771..efa7fb4 100755
--- a/packaging/debian/monkeysphere.postinst
+++ b/packaging/debian/monkeysphere.postinst
@@ -17,6 +17,9 @@ if ! getent passwd monkeysphere >/dev/null ; then
monkeysphere
fi
+# try to transition from 0.22 to 0.23:
+/usr/share/monkeysphere/transition_0.22_0.23
+
# setup monkeysphere authentication
monkeysphere-authentication setup
diff --git a/src/share/common b/src/share/common
index b45363a..a2f4494 100644
--- a/src/share/common
+++ b/src/share/common
@@ -8,7 +8,7 @@
# Jamie McClelland <jm@mayfirst.org>
# Daniel Kahn Gillmor <dkg@fifthhorseman.net>
#
-# Copyright 2008, released under the GPL, version 3 or later
+# Copyright 2008-2009, released under the GPL, version 3 or later
# all-caps variables are meant to be user supplied (ie. from config
# file) and are considered global
diff --git a/src/transition_0.22_0.23 b/src/transition_0.22_0.23
index 12ef1d2..e1c9e9e 100755
--- a/src/transition_0.22_0.23
+++ b/src/transition_0.22_0.23
@@ -1,10 +1,24 @@
#!/bin/bash
-# this script should run without any errors.
-set -e
-
# This is a post-install script for monkeysphere, to transition an old
-# (<0.23) setup to the new (>=0.23) setup
+# (<0.23) setup to the new (>=0.23) setup.
+
+# You should be able to run this script after any version >= 0.23 is
+# installed. This script should be well-behaved, even if it is run
+# repeatedly.
+
+# Written by
+# Jameson Rollins <jrollins@finestructure.net>
+# Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+#
+# Copyright 2009, released under the GPL, version 3 or later
+
+# NOTE: the reverse operation (downgrading) is not directly supported,
+# and MAY LOCK YOU OUT OF YOUR SYSTEM, depending on how you have
+# configured the monkeysphere!
+
+# any unexpected errors should cause this script to bail:
+set -e
SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"}
@@ -29,7 +43,9 @@ is_domain_name() {
printf "%s" "$1" | egrep -q '^[[:alnum:]][[:alnum:]-.]*[[:alnum:]]$'
}
-# run the authentication setup
+# run the authentication setup (this is also the first chance to bail
+# if 0.23 is not fully-installed, because m-a did not exist before
+# 0.23)
monkeysphere-authentication setup
# before 0.23, the old gnupg-host data directory used to contain the