diff options
author | Björn Hagemeister | 2014-10-21 15:26:10 +0200 |
---|---|---|
committer | Björn Hagemeister | 2014-10-21 15:26:10 +0200 |
commit | a5e0525cb3a5e6a3f4ba51d0bcd4ec194941974f (patch) | |
tree | c2948eb1436c74d86d81eb4fd62c717df6dd5443 | |
parent | Implemented registerSatellite without neccessary valid session. (diff) | |
download | satellite-daemon-a5e0525cb3a5e6a3f4ba51d0bcd4ec194941974f.tar.gz satellite-daemon-a5e0525cb3a5e6a3f4ba51d0bcd4ec194941974f.tar.xz satellite-daemon-a5e0525cb3a5e6a3f4ba51d0bcd4ec194941974f.zip |
Added usage info in case of invalid given arguments.
-rw-r--r-- | src/main/java/org/openslx/satellitedaemon/App.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/App.java b/src/main/java/org/openslx/satellitedaemon/App.java index 2982a84..4a6bb7b 100644 --- a/src/main/java/org/openslx/satellitedaemon/App.java +++ b/src/main/java/org/openslx/satellitedaemon/App.java @@ -88,6 +88,17 @@ public class App log.error( "Illegal option: --updateaddress requires <IPADDRESS>" ); System.exit( 2 ); } + } else { + // no correct option was selected. + log.error( "Illegal option: given argument(s) not valid." ); + log.info( "\nUsage: java -jar target/satellite-daemon-1.0-SNAPSHOT-jar-with-dependencies.jar [options]\n" + + " options:\n" + + " [--checkconfig] or\n" + + " [--genid <ORGANIZANTIONNAME>] or\n" + + " [--import <ORGANIZATIONNAME> <MODULUS> <PRIV_EXP> <PUB_EXP>] or\n" + + " [--submitkey <IPADDRESS>] or\n" + + " [--updateaddress <IPADDRESS>]"); + System.exit( 2 ); } } else if ( args.length == 0 ) { // No Option choosed, try to load existing identity. |