feat: do not error out if resolv.conf doesn't already exist
This commit is contained in:
parent
20295cae34
commit
03f30a545e
1 changed files with 2 additions and 2 deletions
4
akshara
4
akshara
|
@ -224,7 +224,7 @@ def update_system():
|
||||||
if type(blend_release.get('user-services')) == list:
|
if type(blend_release.get('user-services')) == list:
|
||||||
user_services += blend_release.get('user-services')
|
user_services += blend_release.get('user-services')
|
||||||
|
|
||||||
exec_chroot('bash', '-c', 'rm /.new_rootfs/etc/resolv.conf')
|
exec_chroot('rm', '-f', '/.new_rootfs/etc/resolv.conf')
|
||||||
|
|
||||||
with open('/.new_rootfs/etc/resolv.conf', 'w') as pacman_mirrorlist_conf:
|
with open('/.new_rootfs/etc/resolv.conf', 'w') as pacman_mirrorlist_conf:
|
||||||
pacman_mirrorlist_conf.write('nameserver 1.1.1.1\n')
|
pacman_mirrorlist_conf.write('nameserver 1.1.1.1\n')
|
||||||
|
@ -354,7 +354,7 @@ Server = {package_repo["repo-url"]}
|
||||||
exec('cp', '-ax', '/etc/locale.gen', '/.new_rootfs/etc/locale.gen')
|
exec('cp', '-ax', '/etc/locale.gen', '/.new_rootfs/etc/locale.gen')
|
||||||
exec_chroot('locale-gen')
|
exec_chroot('locale-gen')
|
||||||
|
|
||||||
exec_chroot('bash', '-c', 'rm /.new_rootfs/etc/resolv.conf')
|
exec_chroot('rm', '-f', '/.new_rootfs/etc/resolv.conf')
|
||||||
|
|
||||||
exec('cp', '-ax', '/.new_rootfs/etc', '/.new.etc')
|
exec('cp', '-ax', '/.new_rootfs/etc', '/.new.etc')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue