]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: error out on bad usage
authorSage Weil <sage@newdream.net>
Wed, 25 May 2011 00:05:30 +0000 (17:05 -0700)
committerSage Weil <sage@newdream.net>
Wed, 25 May 2011 00:06:13 +0000 (17:06 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/mkcephfs.in

index 8558754e58c4b56422797c71aa7e1952b96581a5..0e0ca6e59505452d626ce8914abf58d06ff69f55 100644 (file)
@@ -61,6 +61,7 @@ fi
 
 usage_exit() {
     echo "usage: $0 -a -c ceph.conf [-k adminkeyring] [--mkbtrfs]"
+    echo "   to generate a new ceph cluster on all nodes; for advanced usage see man page"
     echo "   ** be careful, this WILL clobber old data; check your ceph.conf carefully **"
     exit
 }
@@ -168,6 +169,14 @@ done
 
 [ -z "$conf" ] && [ -n "$dir" ] && conf="$dir/conf"
 
+if [ $allhosts -eq 1 ]; then
+    if [ $preparemonmap -eq 1 ] || [ -n "$initdaemon" ] || [ -n "$initlocaldaemons" ] || [ -n "$prepareosdfs" ] || [ -n "$preparemon" ] ; then
+       echo "The -a option cannot be combined with other subcommands; see man page."
+       usage_exit
+    fi
+fi
+
+
 
 ### prepare-monmap ###