chore: do not delete blend user during postinst
This commit is contained in:
parent
e4192f57ae
commit
53d7902487
2 changed files with 2 additions and 31 deletions
28
blend-inst
28
blend-inst
|
@ -280,33 +280,6 @@ def inst_bootloader(config):
|
|||
exec_chroot(['grub-mkconfig', '-o', '/boot/grub/grub.cfg'])
|
||||
|
||||
|
||||
########################################################################################
|
||||
# Locale
|
||||
|
||||
|
||||
def inst_locale(config):
|
||||
# Set locale
|
||||
exec_chroot(['bash', '-c', 'echo \'en_US.UTF-8 UTF-8\' > /etc/locale.gen'])
|
||||
first_locale = True
|
||||
for locale in config['locale']['locale']:
|
||||
if locale != 'en_US.UTF-8 UTF-8':
|
||||
exec_chroot(
|
||||
['bash', '-c', f'echo \'{locale}\' >> /etc/locale.gen'])
|
||||
if first_locale:
|
||||
exec_chroot(
|
||||
['bash', '-c', f'echo \'LANG={locale.split()[0]}\' > /etc/locale.conf'])
|
||||
first_locale = False
|
||||
exec_chroot(['locale-gen'])
|
||||
|
||||
# Set keyboard layout
|
||||
exec_chroot(
|
||||
['bash', '-c', f'echo \'KEYMAP={config["locale"]["keymap"]}\' > /etc/vconsole.conf'])
|
||||
|
||||
# Set timezone
|
||||
exec_chroot(
|
||||
['ln', '-sf', f'/usr/share/zoneinfo/{config["locale"]["timezone"]}', '/etc/localtime'])
|
||||
|
||||
|
||||
########################################################################################
|
||||
# Networking
|
||||
|
||||
|
@ -376,7 +349,6 @@ try:
|
|||
inst_partition(config)
|
||||
inst_setup_base(config)
|
||||
inst_bootloader(config)
|
||||
inst_locale(config)
|
||||
inst_networking(config)
|
||||
inst_users(config)
|
||||
|
||||
|
|
|
@ -133,9 +133,8 @@ def inst_networking(config):
|
|||
|
||||
|
||||
def inst_users(config):
|
||||
exec_chroot(['bash', '-c', 'userdel -r blend &>/dev/null'])
|
||||
|
||||
for home_dir in os.listdir('/home'):
|
||||
if not home_dir == 'blend':
|
||||
exec(['rm', '-rf', '/home/' + home_dir])
|
||||
|
||||
# Add users
|
||||
|
|
Loading…
Reference in a new issue