From d94c354e81e9fe99693b6ee44a65dad4515c453c Mon Sep 17 00:00:00 2001 From: Minfei Huang Date: Fri, 5 Dec 2014 14:46:14 +0800 Subject: [PATCH] module-setup: Do not show the noisy in the terminal It is boring that internal result is shown in the terminal. Do not print anything to standard output by using the command "grep -q". Signed-off-by: Minfei Huang Acked-by: Baoquan He Acked-by: WANG Chao --- dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index dcebc47..9299b5d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -212,7 +212,7 @@ get_routes() { local _route _route=`/sbin/ip route get to $_target 2>&1` - if /sbin/ip route get to $_target | grep "via"; + if /sbin/ip route get to $_target | grep -q "via"; then # route going to a different subnet via a router echo $_route | awk '{printf("rd.route=%s:%s:%s\n", $1, $3, $5)}' \