@@ -185,9 +185,15 @@ for name in $what; do
check_host || continue
if [ -n "$ssh" ] && ( echo $pushed_to | grep -v -q " $host " ); then
- scp -q $conf $host:$conf
- scp -q $osdmap $host:$osdmap
- scp -q $monmap $host:$monmap
+ if [ -n "$user" ]; then
+ scp -q $conf $user@$host:$conf
+ scp -q $osdmap $user@$host:$osdmap
+ scp -q $monmap $user@$host:$monmap
+ else
+ scp -q $conf $host:$conf
+ scp -q $osdmap $host:$osdmap
+ scp -q $monmap $host:$monmap
+ fi
pushed_to="$pushed_to $host "
fi
@@ -239,7 +245,13 @@ for name in $what; do
do_root_cmd "umount $btrfs_path ; for f in $btrfs_devs ; do umount \$f ; done ; modprobe btrfs ; mkfs.btrfs $btrfs_devs ; modprobe btrfs ; btrfsctl -a ; mount -t btrfs $btrfs_opt $first_dev $btrfs_path ; chown $osd_user $btrfs_path ; chmod +w $btrfs_path "
fi
- [ -n "$ssh" ] && scp $monmap $host:$monmap
+ if [ -n "$ssh" ]; then
+ if [ -n "$user" ]; then
+ scp $monmap $user@$host:$monmap
+ else
+ scp $monmap $host:$monmap
+ fi
+ fi
do_cmd "$BINDIR/cosd -c $conf --monmap $monmap -i $num --mkfs --osd-data $osd_data"
if [ -n "$keyring" ]; then