diff options
4 files changed, 9 insertions, 8 deletions
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index 753f41b..aef81a5 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -2,6 +2,7 @@ tag: type: u32 help: "vlan ID" syntax: $(@) >= 0 && $(@) <= 4095; "vlan ID must be between 0 and 4095" -update: "sudo modprobe 8021q"; "error loading 802.1q driver" -update: "sudo vconfig add $(../@) $(@)"; "error adding vlan id $(@) to dev $(../@)" -delete: "sudo vconfig rem $(../@).$(@)"; "error removing vlan id $(@) from dev $(../@)" +update: "sudo modprobe 8021q"; "Error loading 802.1q driver" +update: "sudo vconfig add $(../@) $(@)"; "Error adding vlan id $(@) to dev $(../@)" +update: "sudo ip link set $(../@).$(@) up"; "Error enabing vlan id $(@) on dev $(../@)" +delete: "sudo vconfig rem $(../@).$(@)"; "Error removing vlan id $(@) from dev $(../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def index af01547..c153e82 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def @@ -1,5 +1,5 @@ multi: type: ipv4net help: "Set IPv4 address and prefix for this interface" -update: "sudo ip addr add $(@) dev $(../../@)"; "error setting address $(@) on dev $(../../@)" -delete: "sudo ip addr del $(@) dev $(../../@)"; "error deleteing address $(@) on dev $(../../@)" +update: "sudo ip addr add $(@) dev $(../../@).$(../@)"; "Error setting address $(@) on dev $(../../@).$(../@)" +delete: "sudo ip addr del $(@) dev $(../../@).$(../@)"; "Error deleteing address $(@) on dev $(../../@).$(../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def new file mode 100644 index 0000000..6bb8d8d --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def @@ -0,0 +1,3 @@ +help: "Disable interface" +update: "sudo ip link set $(../../@).$(../@) down"; "Error disabling dev $(../../@).$(../@)" +delete: "sudo ip link set $(../../@).$(../@) up"; "Error enabling dev $(../../@).$(../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/enable/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/enable/node.def deleted file mode 100644 index 0309578..0000000 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/enable/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: "enable interface" -update: "sudo ip link set $(../../@) up"; "error enabling dev $(../../@)" -delete: "sudo ip link set $(../../@) down"; "error disabling dev $(../../@)" |