refs #2094 try fixing resolvconf
parent
d44d848327
commit
19c63800de
|
@ -87,7 +87,7 @@ def boottoolsSoftwareCompile():
|
||||||
print ('boottoolsSoftwareCompile: spartlnx', file=sys.stderr)
|
print ('boottoolsSoftwareCompile: spartlnx', file=sys.stderr)
|
||||||
try: utils.run (['which', 'spartl64.run'])
|
try: utils.run (['which', 'spartl64.run'])
|
||||||
except:
|
except:
|
||||||
utils.run (['wget', '--quiet', 'http://damien.guibouret.free.fr/savepart.zip'])
|
utils.run (['wget', '--tries=5', 'http://damien.guibouret.free.fr/savepart.zip'])
|
||||||
utils.run (['unzip', '-o', 'savepart.zip', '-d', '/sbin/', 'spartl64.run', 'spartlnx.run'])
|
utils.run (['unzip', '-o', 'savepart.zip', '-d', '/sbin/', 'spartl64.run', 'spartlnx.run'])
|
||||||
utils.run (['mkdir', '/usr/share/doc/spartlnx'])
|
utils.run (['mkdir', '/usr/share/doc/spartlnx'])
|
||||||
utils.run (['unzip', '-j', '-o', 'savepart.zip', '-d', '/usr/share/doc/spartlnx/', 'doc/en/*'])
|
utils.run (['unzip', '-j', '-o', 'savepart.zip', '-d', '/usr/share/doc/spartlnx/', 'doc/en/*'])
|
||||||
|
@ -115,12 +115,21 @@ def boottoolsRemovePackages():
|
||||||
print ('boottoolsRemovePackages', file=sys.stderr)
|
print ('boottoolsRemovePackages', file=sys.stderr)
|
||||||
apt.remove (['python3-dev', 'python3-setuptools', 'python3-pip'])
|
apt.remove (['python3-dev', 'python3-setuptools', 'python3-pip'])
|
||||||
|
|
||||||
def setup_resolvconf():
|
def setup_resolvconf1():
|
||||||
if os.path.islink('/etc/resolc.conf'):
|
print ('setup_resolvconf1', file=sys.stderr)
|
||||||
os.unlink ('/etc/resolv.conf')
|
subprocess.run (['ls', '-l', '/etc/resolv.conf'])
|
||||||
|
os.unlink ('/etc/resolv.conf')
|
||||||
f = open ('/etc/resolv.conf', 'w')
|
f = open ('/etc/resolv.conf', 'w')
|
||||||
f.write ('nameserver 8.8.8.8')
|
f.write ('nameserver 8.8.8.8')
|
||||||
f.close()
|
f.close()
|
||||||
|
subprocess.run (['ls', '-l', '/etc/resolv.conf'])
|
||||||
|
|
||||||
|
def setup_resolvconf2():
|
||||||
|
print ('setup_resolvconf2', file=sys.stderr)
|
||||||
|
subprocess.run (['ls', '-l', '/etc/resolv.conf'])
|
||||||
|
os.unlink ('/etc/resolv.conf')
|
||||||
|
os.symlink ('/run/resolvconf/resolv.conf', '/etc/resolv.conf')
|
||||||
|
subprocess.run (['ls', '-l', '/etc/resolv.conf'])
|
||||||
|
|
||||||
def boottoolsInitrdGenerate (osrelease):
|
def boottoolsInitrdGenerate (osrelease):
|
||||||
print ('boottoolsInitrdGenerate', file=sys.stderr)
|
print ('boottoolsInitrdGenerate', file=sys.stderr)
|
||||||
|
@ -159,10 +168,10 @@ if __name__ == '__main__':
|
||||||
debconf_settings = config['General'].get ('debconf_settings')
|
debconf_settings = config['General'].get ('debconf_settings')
|
||||||
|
|
||||||
updateCaCertificates()
|
updateCaCertificates()
|
||||||
setup_resolvconf()
|
setup_resolvconf1()
|
||||||
boottoolsSoftwareInstall (args.osarch, args.osrelease)
|
boottoolsSoftwareInstall (args.osarch, args.osrelease)
|
||||||
boottoolsSoftwareCompile()
|
boottoolsSoftwareCompile()
|
||||||
boottoolsPythonModules()
|
boottoolsPythonModules()
|
||||||
boottoolsRemovePackages()
|
boottoolsRemovePackages()
|
||||||
setup_resolvconf() ## do this again, since someone seems to be overwriting the file
|
setup_resolvconf2()
|
||||||
boottoolsInitrdGenerate (args.osrelease)
|
boottoolsInitrdGenerate (args.osrelease)
|
||||||
|
|
Loading…
Reference in New Issue