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 <mhuang@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
This commit is contained in:
Minfei Huang 2014-12-05 14:46:14 +08:00 committed by WANG Chao
parent 1742affe2c
commit d94c354e81
1 changed files with 1 additions and 1 deletions

View File

@ -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)}' \