]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemons: some more fixes
authorYehuda Sadeh <yehuda@hq.newdream.net>
Sat, 28 Feb 2009 01:11:10 +0000 (17:11 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Sat, 28 Feb 2009 01:11:10 +0000 (17:11 -0800)
src/ceph-daemons
src/cmon.cc

index 93a28883867270f5eaa5c88be350d3ac434f9066..675b6a3aef18fab48cdceb53bc3f44d31b1c82c6 100755 (executable)
@@ -101,7 +101,7 @@ for name in $what; do
     sections="$name $type global"
 
     # this host?
-    host=`$CCONF -c $conf -s $name -s $type -s global host`
+    host=`$CCONF --conf_file $conf -s $name -s $type -s global host`
     ssh=""
     cmd=""
     if [[ $host != "" ]]; then
@@ -114,7 +114,7 @@ for name in $what; do
 
            # we'll need to ssh into that host
            ssh="ssh root@$host"
-           cd_path=`$CCONF -c $conf -s $name -s $type -s global "ssh path"`
+           cd_path=`$CCONF --conf_file $conf -s $name -s $type -s global "ssh path"`
        fi
     else
        host=$hostname
@@ -128,17 +128,18 @@ for name in $what; do
     if [[ $name =~ "mon" ]]; then
        get_conf mon_path "" "mon path" $sections
        cmd="$BINDIR/cmon $mon_path"
+       echo cmd=$cmd
     fi
 
     if [[ $name =~ "mds" ]]; then
-       cmd="$BINDIR/cmds -c $conf_file $mon_addr_cmd"
+       cmd="$BINDIR/cmds --conf_file $conf_file $mon_addr_cmd"
     fi
 
     if [[ $name =~ "osd" ]]; then
        get_conf osd_data "" "osd data" $sections
        get_conf osd_journal "" "osd journal" $sections
        [ "$osd_journal" != "" ] && osd_journal_cmd="-j $osd_journal" || osd_journal_cmd=""
-       cmd="$BINDIR/cosd -c $conf_file \
+       cmd="$BINDIR/cosd --conf_file $conf_file \
                        $mon_addr_cmd $osd_data $osd_journal_cmd"
     fi
 
index 2f217ddf7b4891b163069a13943a55dc3d819f71..05e35b4a286a368117d6d2e224832a51a17d7002 100644 (file)
@@ -56,11 +56,14 @@ int main(int argc, const char **argv)
   // args
   const char *fsdir = 0;
   for (unsigned i=0; i<args.size(); i++) {
-    if (!fsdir)
-      fsdir = args[i];
-    else 
-      usage();
+    if (args[i][0] != '-') {
+      if (!fsdir)
+        fsdir = args[i];
+      else if (fsdir)
+        usage();
+    }
   }
+
   if (!fsdir)
     usage();