Skip to content

Commit 95df0fe

Browse files
authored
Fixing bug so vpc only runs udev update when the rules file doesn't exist. VPCs have additional udev rules that cause iptables to get destroyed when the interface is updated. (#81)
1 parent 68e5ba8 commit 95df0fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

systemvm/debian/opt/cloud/bin/setup/vpcrouter.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ setup_vpcrouter() {
2929
auto lo eth0
3030
iface lo inet loopback
3131
EOF
32+
if [ ! -f /etc/udev/rules.d/gro-off.rules ]; then
33+
cp /etc/gro-off.rules /etc/udev/rules.d/gro-off.rules
34+
udevadm control --reload-rules && udevadm trigger
35+
fi
3236
setup_interface "0" $ETH0_IP $ETH0_MASK $GW
3337

3438
echo $NAME > /etc/hostname
@@ -88,8 +92,6 @@ EOF
8892
cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4
8993
setup_sshd $ETH0_IP "eth0"
9094
cp /etc/vpcdnsmasq.conf /etc/dnsmasq.conf
91-
cp /etc/gro-off.rules /etc/udev/rules.d/gro-off.rules
92-
udevadm control --reload-rules && udevadm trigger
9395
cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules
9496
echo "" > /etc/dnsmasq.d/dhcphosts.txt
9597
echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf

0 commit comments

Comments
 (0)