diff options
author | Sage Weil <sage@newdream.net> | 2011-10-17 10:49:46 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-10-17 10:49:46 -0700 |
commit | 9c9560492a369214658a755bd7aae39df4ce972f (patch) | |
tree | 1466e455b90f723cb3dba1143cbf590c81f51ee4 /src/mkcephfs.in | |
parent | 84a6f6e7ae69858d04ad117a225a6a19c18abf71 (diff) | |
download | ceph-9c9560492a369214658a755bd7aae39df4ce972f.tar.gz |
mkcephfs: copy ceph.conf to /etc/ceph/ceph.conf (when -a)
You can disable this with --no-copy-conf.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/mkcephfs.in')
-rw-r--r-- | src/mkcephfs.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mkcephfs.in b/src/mkcephfs.in index 7770c78a6aa..d2cb1de5dbf 100644 --- a/src/mkcephfs.in +++ b/src/mkcephfs.in @@ -88,6 +88,7 @@ dir="" moreargs="" auto_action=0 manual_action=0 +nocopyconf=0 while [ $# -ge 1 ]; do case $1 in @@ -132,6 +133,9 @@ case $1 in --mkbtrfs) mkbtrfs=1 ;; + --no-copy-conf) + nocopyconf=1 + ;; --conf | -c) [ -z "$2" ] && usage_exit shift @@ -441,8 +445,18 @@ if [ $allhosts -eq 1 ]; then do_cmd "mkdir -p $rdir" scp -q $dir/conf $host:$rdir scp -q $dir/monmap $host:$rdir + + if [ $nocopyconf -eq 0 ]; then + # also put conf at /etc/ceph/ceph.conf + scp -q $dir/conf $host:/etc/ceph/ceph.conf + fi else rdir=$dir + + if [ $nocopyconf -eq 0 ]; then + # also put conf at /etc/ceph/ceph.conf + cp $dir/conf /etc/ceph/ceph.conf + fi fi if [ $mkbtrfs -eq 1 ] && [ "$type" = "osd" ]; then @@ -476,8 +490,18 @@ if [ $allhosts -eq 1 ]; then echo pushing everything to $host ssh $host mkdir -p $rdir scp -q $dir/* $host:$rdir + + if [ $nocopyconf -eq 0 ]; then + # also put conf at /etc/ceph/ceph.conf + scp -q $dir/conf $host:/etc/ceph/ceph.conf + fi else rdir=$dir + + if [ $nocopyconf -eq 0 ]; then + # also put conf at /etc/ceph/ceph.conf + cp $dir/conf /etc/ceph/ceph.conf + fi fi do_root_cmd "$0 -d $rdir --init-daemon $name" |