clearer error reporting for transition scripts in postinst.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 2 Mar 2009 22:49:53 +0000 (17:49 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 2 Mar 2009 22:49:53 +0000 (17:49 -0500)
packaging/debian/monkeysphere.postinst

index 6b12ee86a5100dc079728a65f6bff22106661cb2..4e811672cb7237ec9508c50a81819a863763c121 100755 (executable)
@@ -21,8 +21,15 @@ case $1 in
                monkeysphere
        fi
 
-       # try to transition from to 0.23:
-       /usr/share/monkeysphere/transitions/0.23
+       # try all available transitions:
+       for trans in 0.23 ; do
+           /usr/share/monkeysphere/transitions/$trans || { \
+               RET=$?
+               echo "Failed running transition script /usr/share/monkeysphere/transitions/$trans" >&2
+               exit $RET
+           }
+       done
+           
 
        # setup monkeysphere authentication
        monkeysphere-authentication setup