feat: remove resolv.conf before dircmp
This commit is contained in:
parent
a0b4a25934
commit
20295cae34
1 changed files with 5 additions and 3 deletions
8
akshara
8
akshara
|
@ -124,7 +124,9 @@ def update_system():
|
||||||
|
|
||||||
os.chdir('/')
|
os.chdir('/')
|
||||||
|
|
||||||
exec('rm', '-rf', '/.new_rootfs', '/.new.etc', '/.new.var.lib')
|
if exec('rm', '-rf', '/.new_rootfs', '/.new.etc', '/.new.var.lib') != 0:
|
||||||
|
exec('umount', '-l', '/.new_rootfs')
|
||||||
|
exec('rm', '-rf', '/.new_rootfs', '/.new.etc', '/.new.var.lib')
|
||||||
|
|
||||||
# Check if update is available
|
# Check if update is available
|
||||||
if not os.path.isfile('/system.yaml'):
|
if not os.path.isfile('/system.yaml'):
|
||||||
|
@ -222,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('cp', '/.new_rootfs/etc/resolv.conf', '/.new_rootfs/etc/resolv.conf.orig')
|
exec_chroot('bash', '-c', 'rm /.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')
|
||||||
|
@ -352,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('mv', '/.new_rootfs/etc/resolv.conf.orig', '/.new_rootfs/etc/resolv.conf')
|
exec_chroot('bash', '-c', 'rm /.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