ethtool: fix up gather_params() calls a bit
This commit is contained in:
parent
4e78d7e5d5
commit
6ae3414329
1 changed files with 5 additions and 6 deletions
|
@ -25,10 +25,7 @@ pre-up)
|
||||||
;;
|
;;
|
||||||
up)
|
up)
|
||||||
# first do the link settings.
|
# first do the link settings.
|
||||||
link_settings="\
|
link_settings="${IF_ETHTOOL_LINK_SPEED:+ speed $IF_ETHTOOL_LINK_SPEED}${IF_ETHTOOL_LINK_DUPLEX:+ duplex $IF_ETHTOOL_LINK_DUPLEX}"
|
||||||
${IF_ETHTOOL_LINK_SPEED:+ speed $IF_ETHTOOL_LINK_SPEED}
|
|
||||||
${IF_ETHTOOL_LINK_DUPLEX:+ duplex $IF_ETHTOOL_LINK_DUPLEX}
|
|
||||||
"
|
|
||||||
|
|
||||||
# ethernet-wol can have a second arg (key), split into $1 and $2
|
# ethernet-wol can have a second arg (key), split into $1 and $2
|
||||||
set -- $IF_ETHTOOL_ETHERNET_WOL
|
set -- $IF_ETHTOOL_ETHERNET_WOL
|
||||||
|
@ -36,6 +33,8 @@ up)
|
||||||
|
|
||||||
# handle ethtool-ethernet-autoneg like Debian would
|
# handle ethtool-ethernet-autoneg like Debian would
|
||||||
case "$IF_ETHTOOL_ETHERNET_AUTONEG" in
|
case "$IF_ETHTOOL_ETHERNET_AUTONEG" in
|
||||||
|
'')
|
||||||
|
;;
|
||||||
on|off)
|
on|off)
|
||||||
link_settings="$link_settings autoneg $IF_ETHTOOL_ETHERNET_AUTONEG"
|
link_settings="$link_settings autoneg $IF_ETHTOOL_ETHERNET_AUTONEG"
|
||||||
;;
|
;;
|
||||||
|
@ -46,10 +45,10 @@ up)
|
||||||
|
|
||||||
[ -z "$link_settings" ] || $MOCK ethtool --change "$IFACE" $link_settings
|
[ -z "$link_settings" ] || $MOCK ethtool --change "$IFACE" $link_settings
|
||||||
|
|
||||||
pause_settings=$(gather_params IF_ETHTOOL_PAUSE)
|
pause_settings=$(gather_params ETHTOOL_PAUSE)
|
||||||
[ -z "$pause_settings" ] || $MOCK ethtool --pause "$IFACE" $pause_settings
|
[ -z "$pause_settings" ] || $MOCK ethtool --pause "$IFACE" $pause_settings
|
||||||
|
|
||||||
offload_settings=$(gather_params IF_ETHTOOL_OFFLOAD)
|
offload_settings=$(gather_params ETHTOOL_OFFLOAD)
|
||||||
[ -z "$offload_settings" ] || $MOCK ethtool --offload "$IFACE" $offload_settings
|
[ -z "$offload_settings" ] || $MOCK ethtool --offload "$IFACE" $offload_settings
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue