]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Always use keyringer_exec / init action check
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 14 Mar 2014 13:33:33 +0000 (10:33 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 14 Mar 2014 13:33:33 +0000 (10:33 -0300)
keyringer

index e57dfd00115c8bc27a0588ddf3b8bad2e59a4121..da876788d94b528d3e6ff9484bb40f52530d0f3b 100755 (executable)
--- a/keyringer
+++ b/keyringer
@@ -97,7 +97,7 @@ function keyringer_init {
     echo "Now you have to edit the default recipient configuration to be able to encrypt secrets."
     echo "Press any key to proceed editing..."
     read key
-    keyringer $KEYRING recipients edit default
+    keyringer_exec recipients "$BASEDIR" edit default
 
     # Stage and commit
     keyringer_exec git "$BASEDIR" add .
@@ -162,7 +162,7 @@ fi
 source "$LIB" || exit 1
 
 # Check if keyring exist
-if [ ! -f "$CONFIG_BASE/$KEYRING" ]; then
+if [ ! -f "$CONFIG_BASE/$KEYRING" ] && [ "$ACTION" != "init" ]; then
   echo "No such keyring $KEYRING"
   exit 1
 fi