diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-14 10:55:19 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-14 10:55:19 -0300 |
commit | 3f7f4aa86309ebc44e1097158ec33abda3465945 (patch) | |
tree | 8a3dfbf5c29b9d97baefb767b0bc25e788e836b5 | |
parent | 15fbe5a432a361cc9c7a628aaae7c041263d3086 (diff) | |
download | keyringer-3f7f4aa86309ebc44e1097158ec33abda3465945.tar.gz keyringer-3f7f4aa86309ebc44e1097158ec33abda3465945.tar.bz2 |
Basic checks
-rwxr-xr-x | keyringer | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -177,8 +177,11 @@ fi # Load functions source "$LIB" || exit 1 -# Check if keyring exists -if [ ! -f "$CONFIG_BASE/$KEYRING" ] && [ "$ACTION" != "init" ]; then +# Basic checks +if [ -z "$KEYRING" ]; then + keyringer_usage + exit 1 +elif [ ! -f "$CONFIG_BASE/$KEYRING" ] && [ "$ACTION" != "init" ]; then echo "No such keyring $KEYRING" exit 1 fi @@ -187,10 +190,7 @@ fi keyringer_config_load # Dispatch -if [ -z "$KEYRING" ]; then - keyringer_usage - exit 1 -elif [ -z "$ACTION" ]; then +if [ -z "$ACTION" ]; then # Run shell if no action were given keyringer $KEYRING shell elif [ "$ACTION" == "init" ]; then |