network: remove trailing spacing when setting HWADDR for ifcfg-p2p0 for NetworkManager to parse it correctly

This commit is contained in:
Silvan Calarco 2013-09-19 02:30:06 +02:00
parent 29ea391692
commit fdfb337dcb

View File

@ -152,7 +152,7 @@ for net_int in $(cat /proc/net/dev | sed -n '/p2p[0-9]*:/{s,:.*,,;p}'); do
P2P_HWADDR=`ifconfig $net_int | grep HWaddr | sed "s|.* HWaddr ||"` P2P_HWADDR=`ifconfig $net_int | grep HWaddr | sed "s|.* HWaddr ||"`
cat > $network_devices/ifcfg-${net_int} << _EOF cat > $network_devices/ifcfg-${net_int} << _EOF
DEVICE=$net_int DEVICE=$net_int
HWADDR=$P2P_HWADDR HWADDR=${P2P_HWADDR:0:17}
ONBOOT=no ONBOOT=no
NM_CONTROLLED=no NM_CONTROLLED=no
_EOF _EOF