Make the interface_up script not so distro-specific

Change-Id: I70a4c2fd1bf6ddfae64546a030654727048d307d
This commit is contained in:
Alex Ruiz Estradera 2016-11-25 09:13:54 +01:00
parent 0d2eeb2000
commit 3403f76919
1 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,9 @@ define midonet::resources::interface_up(
) {
exec { 'bring_interface_up':
command => "/usr/sbin/ip link set dev $(ip -o link | grep ${mac_address} | awk '{print \$2}' | tr -d ':') up",
onlyif => "/usr/sbin/ip -o link | grep ${mac_address} | grep 'state DOWN'"
path => '/usr/bin:/usr/sbin:/sbin',
command => "ip link set dev $(ip -o link | grep ${mac_address} | awk '{print \$2}' | tr -d ':') up",
onlyif => "ip -o link | grep ${mac_address} | grep 'state DOWN'"
}
}