#!/usr/bin/python
import re
import sys
import os

INTERFACES = re.compile(r'INTERFACES=\"\"',re.DOTALL)
TEMP_FILE = '~temp'
IN_FILE = sys.argv[1]

infile = open(IN_FILE,'r')
outfile = open(TEMP_FILE,'w')
for line in infile:
	if not INTERFACES.match(line):
		outfile.write(line)
	else:
		outfile.write("INTERFACES=\"eth0\"\n")

os.system('mv %s %s'%(TEMP_FILE,IN_FILE))
os.system('rm -rf %s'%(TEMP_FILE))
