On Tue, Dec 24, 2013 at 05:49:22PM +0800, WANG Chao wrote:
When we're parsing kdump.conf, we read it from stdin in a while
loop statement. If we don't use ssh -n within the loop, all rest of the
kdump.conf options, which are in stdin, will be eaten by ssh.
Signed-off-by: WANG Chao <chaowang(a)redhat.com>
Use of "ssh -n" inside mkdir_save_path_ssh() is little subtle. It is not
clear why we are doing it. Can yo u please put a comment above
mkdir_save_path_ssh() mentioning that it is called from while loop and it
should not read from stdin and that's why we are using ssh -n.
Otherwise patch looks good to me.
Thanks
Vivek
---
mkdumprd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkdumprd b/mkdumprd
index 6de1755..43a41cb 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -153,7 +153,7 @@ mkdir_save_path_ssh()
{
local _opt _dir
_opt="-i $SSH_KEY_LOCATION -o BatchMode=yes -o StrictHostKeyChecking=yes"
- ssh -q $_opt $1 mkdir -p $SAVE_PATH 2>&1 > /dev/null
+ ssh -qn $_opt $1 mkdir -p $SAVE_PATH 2>&1 > /dev/null
_ret=$?
if [ $_ret -ne 0 ]; then
perror_exit "mkdir failed on $DUMP_TARGET:$SAVE_PATH"
@@ -165,7 +165,7 @@ mkdir_save_path_ssh()
if [ $_ret -ne 0 ]; then
perror_exit "Could not create temporary directory on
$DUMP_TARGET:$SAVE_PATH. Make sure user has write permission on destination"
fi
- ssh -q $_opt $1 rmdir $_dir
+ ssh -qn $_opt $1 rmdir $_dir
return 0
}
--
1.8.4.2
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec