Add lo back in to the debian files

We were overwriting the loopback interface definition, which makes Clint
unhappy.

Also - in doing this, noticed that the test regeneration was off. Fixed
it.
This commit is contained in:
Monty Taylor 2015-04-13 11:00:33 -04:00
parent fd51d393d8
commit 5721a77640
14 changed files with 16 additions and 24 deletions

View File

@ -103,7 +103,7 @@ def write_redhat_interfaces(interfaces, sys_interfaces):
def write_debian_interfaces(interfaces, sys_interfaces):
results = ""
results = "auto lo\niface lo inet loopback\n"
# Sort the interfaces by id so that we'll have consistent output order
for iname, interface in sorted(
interfaces.items(), key=lambda x: x[1]['id']):
@ -198,8 +198,7 @@ def finish_files(files_to_write, args):
# Don't write empty files
continue
if args.noop:
print("### Write {0}".format(k))
print(files_to_write[k])
sys.stdout.write("### Write {0}\n{1}".format(k, files_to_write[k]))
else:
with open(k, 'w') as outfile:
outfile.write(files_to_write[k])
@ -312,7 +311,7 @@ def write_ssh_keys(args):
name=name))
keys_to_write.append(key)
files_to_write = {
authorized_keys: '\n'.join(keys_to_write),
'/root/.ssh/authorized_keys': '\n'.join(keys_to_write),
}
finish_files(files_to_write, args)

View File

@ -1,4 +1,6 @@
### Write /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1

View File

@ -1,4 +1,3 @@
### Write /root/.ssh/authorized_keys
# Injected key mordred by keypair extension
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLsTZJ8hXTmzjKxYh/7V07mIy8xl2HL+9BaUlt6A6TMsL3LSvaVQNSgmXX5g0XfPWSCKmkZb1O28q49jQI2n7n7+sHkxn0dJDxj1N2oNrzNY7pDuPrdtCijczLFdievygXNhXNkQ2WIqHXDquN/jfLLJ9L0jxtxtsUMbiL2xxZEZcaf/K5MqyPhscpqiVNE1MjE4xgPbIbv8gCKtPpYIIrktOMb4JbV7rhOp5DcSP5gXtLhOF5fbBpZ+szqrTVUcBX0oTYr3iRfOje9WPsTZIk9vBfBtF416mCNxMSRc7KhSW727AnUu85hS0xiP0MRAf69KemG1OE1pW+LtDIAEYp mordred@camelot

View File

@ -1,4 +1,6 @@
### Write /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1

View File

@ -1,7 +1,6 @@
### Write /etc/resolv.conf
nameserver 72.3.128.241
nameserver 72.3.128.240
### Write /etc/sysconfig/network-scripts/ifcfg-eth0
# Automatically generated, do not edit
DEVICE=eth0
@ -13,7 +12,6 @@ ONBOOT=yes
NM_CONTROLLED=no
DEFROUTE=yes
GATEWAY=23.253.229.1
### Write /etc/sysconfig/network-scripts/ifcfg-eth1
# Automatically generated, do not edit
DEVICE=eth1
@ -23,7 +21,6 @@ IPADDR=10.208.169.118
NETMASK=255.255.224.0
ONBOOT=yes
NM_CONTROLLED=no
### Write /etc/sysconfig/network-scripts/route-eth1
ADDRESS0=10.176.0.0
NETMASK0=255.240.0.0
@ -31,4 +28,3 @@ GATEWAY0=10.208.160.1
ADDRESS1=10.208.0.0
NETMASK1=255.240.0.0
GATEWAY1=10.208.160.1

View File

@ -1,4 +1,6 @@
### Write /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 23.253.229.154
@ -12,8 +14,6 @@ iface eth1 inet static
pre-down route del -net 10.176.0.0 netmask 255.240.0.0 gw 10.208.160.1 || true
post-up route add -net 10.208.0.0 netmask 255.240.0.0 gw 10.208.160.1 || true
pre-down route del -net 10.208.0.0 netmask 255.240.0.0 gw 10.208.160.1 || true
### Write /etc/resolv.conf
nameserver 72.3.128.241
nameserver 72.3.128.240

View File

@ -1,7 +1,6 @@
### Write /etc/resolv.conf
nameserver 72.3.128.241
nameserver 72.3.128.240
### Write /etc/sysconfig/network-scripts/ifcfg-eth0
# Automatically generated, do not edit
DEVICE=eth0
@ -13,7 +12,6 @@ ONBOOT=yes
NM_CONTROLLED=no
DEFROUTE=yes
GATEWAY=23.253.229.1
### Write /etc/sysconfig/network-scripts/ifcfg-eth1
# Automatically generated, do not edit
DEVICE=eth1
@ -23,7 +21,6 @@ IPADDR=10.208.169.118
NETMASK=255.255.224.0
ONBOOT=yes
NM_CONTROLLED=no
### Write /etc/sysconfig/network-scripts/route-eth1
ADDRESS0=10.176.0.0
NETMASK0=255.240.0.0
@ -31,4 +28,3 @@ GATEWAY0=10.208.160.1
ADDRESS1=10.208.0.0
NETMASK1=255.240.0.0
GATEWAY1=10.208.160.1

View File

@ -1,4 +1,3 @@
### Write /root/.ssh/authorized_keys
# Injected key mordred by keypair extension
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLsTZJ8hXTmzjKxYh/7V07mIy8xl2HL+9BaUlt6A6TMsL3LSvaVQNSgmXX5g0XfPWSCKmkZb1O28q49jQI2n7n7+sHkxn0dJDxj1N2oNrzNY7pDuPrdtCijczLFdievygXNhXNkQ2WIqHXDquN/jfLLJ9L0jxtxtsUMbiL2xxZEZcaf/K5MqyPhscpqiVNE1MjE4xgPbIbv8gCKtPpYIIrktOMb4JbV7rhOp5DcSP5gXtLhOF5fbBpZ+szqrTVUcBX0oTYr3iRfOje9WPsTZIk9vBfBtF416mCNxMSRc7KhSW727AnUu85hS0xiP0MRAf69KemG1OE1pW+LtDIAEYp mordred@camelot

View File

@ -1,7 +1,6 @@
### Write /etc/resolv.conf
nameserver 72.3.128.241
nameserver 72.3.128.240
### Write /etc/sysconfig/network-scripts/ifcfg-eth0
# Automatically generated, do not edit
DEVICE=eth0
@ -13,7 +12,6 @@ ONBOOT=yes
NM_CONTROLLED=no
DEFROUTE=yes
GATEWAY=23.253.229.1
### Write /etc/sysconfig/network-scripts/ifcfg-eth1
# Automatically generated, do not edit
DEVICE=eth1
@ -23,7 +21,6 @@ IPADDR=10.208.169.118
NETMASK=255.255.224.0
ONBOOT=yes
NM_CONTROLLED=no
### Write /etc/sysconfig/network-scripts/route-eth1
ADDRESS0=10.176.0.0
NETMASK0=255.240.0.0
@ -31,4 +28,3 @@ GATEWAY0=10.208.160.1
ADDRESS1=10.208.0.0
NETMASK1=255.240.0.0
GATEWAY1=10.208.160.1

View File

@ -1,4 +1,6 @@
### Write /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 23.253.229.154
@ -12,8 +14,6 @@ iface eth1 inet static
pre-down route del -net 10.176.0.0 netmask 255.240.0.0 gw 10.208.160.1 || true
post-up route add -net 10.208.0.0 netmask 255.240.0.0 gw 10.208.160.1 || true
pre-down route del -net 10.208.0.0 netmask 255.240.0.0 gw 10.208.160.1 || true
### Write /etc/resolv.conf
nameserver 72.3.128.241
nameserver 72.3.128.240

View File

@ -1,4 +1,6 @@
### Write /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 23.253.229.154

View File

@ -1,4 +1,3 @@
### Write /root/.ssh/authorized_keys
# Injected key mordred by keypair extension
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLsTZJ8hXTmzjKxYh/7V07mIy8xl2HL+9BaUlt6A6TMsL3LSvaVQNSgmXX5g0XfPWSCKmkZb1O28q49jQI2n7n7+sHkxn0dJDxj1N2oNrzNY7pDuPrdtCijczLFdievygXNhXNkQ2WIqHXDquN/jfLLJ9L0jxtxtsUMbiL2xxZEZcaf/K5MqyPhscpqiVNE1MjE4xgPbIbv8gCKtPpYIIrktOMb4JbV7rhOp5DcSP5gXtLhOF5fbBpZ+szqrTVUcBX0oTYr3iRfOje9WPsTZIk9vBfBtF416mCNxMSRc7KhSW727AnUu85hS0xiP0MRAf69KemG1OE1pW+LtDIAEYp mordred@camelot

View File

@ -1,4 +1,6 @@
### Write /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 23.253.229.154

View File

@ -19,7 +19,7 @@
SAMPLE_DIR=glean/tests/fixtures
for vendor_dir in $(find $SAMPLE_DIR \
-maxdepth 1 -mindepth 1 -type d | grep -v test) ; do
-maxdepth 1 -mindepth 1 -type d | grep -v glean/tests/fixtures/test ) ; do
vendor=$(basename $vendor_dir)
python glean/cmd.py \
-n --root $vendor_dir --skip-network --ssh \