aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts')
-rw-r--r--sysconfig/network-scripts/network-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index e5175e01..f015525d 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -5,7 +5,7 @@ source_config ()
{
DEVNAME=`basename $CONFIG | sed 's/^ifcfg-//g'`
- if basename $CONFIG | grep -q '[^g]-' ; then
+ if basename $CONFIG | grep '[^g]-' >/dev/null 2>&1 ; then
PARENTCONFIG=`echo $CONFIG | sed 's/-[^-]*$//g'`
PARENTDEVNAME=`basename $PARENTCONFIG | sed 's/^ifcfg-//g'`
[ -f $PARENTCONFIG ] || {
@@ -43,7 +43,7 @@ set_hostname()
{
echo "$1" > /etc/HOSTNAME
hostname $1
- if ! grep search /etc/resolv.conf; then
+ if ! grep search /etc/resolv.conf >/dev/null 2>&1; then
domain=`echo $1 | sed 's/^[^\.]*\.//'`
echo "search $domain" >> /etc/resolv.conf
fi