summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 3e3e4518..9d591beb 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -171,7 +171,7 @@ rename_device()
{
local target=${3##*/}
- /sbin/ip link set "$target" name "$1" || {
+ /sbin/ip link set "$target" name "$1" 2>/dev/null || {
local hw2=`get_hwaddr ${1}`
local nconfig=`get_config_by_hwaddr ${hw2}`
local curdev=`get_device_by_hwaddr ${hw2}`
@@ -188,7 +188,7 @@ rename_device()
[ -z "$dev" ] && dev=dev$RANDOM
rename_device $dev $hw2 "$3/$curdev"
- /sbin/ip link set "$target" name $1
+ /sbin/ip link set "$target" name $1 2>/dev/null
}
}