提交 b6f05569 编写于 作者: Q Qianqian Zhu

guest_test: Only 'killall x' when the process exists

dhclient is not started by default on new system, so only kill it
when the process exists
Signed-off-by: NQianqian Zhu <qizhu@redhat.com>
Signed-off-by: NXu Han <xuhan@redhat.com>
上级 0924b645
......@@ -42,5 +42,6 @@
pre_command = "echo 'dd if=/dev/zero of=/home/bigfile bs=1M count=2048 && "
pre_command += "\cp -f /home/{bigfile,bigfile.bak} && "
pre_command += "\rm -f /home/{bigfile,bigfile.bak} && "
pre_command += "killall dhclient && dhclient -v && ifconfig -a' > ${guest_script}"
pre_command += "(! pgrep dhclient || killall dhclient) && "
pre_command += "dhclient -v && ifconfig -a' > ${guest_script}"
post_command = "\rm -f ${guest_script}"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册