from rhdialog import *
import rhutil

def docopy(source, to, test):
    args = ("-f", source, to)
    
    rhutil.rhsystem("/bin/cp", args, test)

def finishInstall(test = 0):
    win = WaitBox('Setting up networking')
    docopy("/tmp/HOSTNAME", "/mnt/etc", test)
    docopy("/tmp/hosts", "/mnt/etc", test)
    docopy("/tmp/networks", "/mnt/etc", test)
    docopy("/tmp/resolv.conf", "/mnt/etc", test)
    docopy("/tmp/ifcfg-eth0", "/mnt/etc/sysconfig/network-scripts", test)
    docopy("/tmp/network",  "/mnt/etc/sysconfig", test)
    win.quit()
