19 lines
587 B
Python
19 lines
587 B
Python
#!/usr/bin/python3
|
|
|
|
import os
|
|
import subprocess
|
|
import configparser
|
|
from boottoolsfunctions import _run
|
|
|
|
config = configparser.ConfigParser (inline_comment_prefixes='#')
|
|
if not os.path.exists ('boottoolsgenerator.cfg'):
|
|
print ('configuration file "boottoolsgenerator.cfg" not found')
|
|
sys.exit (1)
|
|
config.read ('boottoolsgenerator.cfg')
|
|
debconf_settings2 = config['debconf'].get ('settings2')
|
|
|
|
subprocess.run (['debconf-set-selections'], input=debconf_settings2, text=True)
|
|
|
|
os.environ['DEBIAN_FRONTEND'] = 'noninteractive'
|
|
_run (['dpkg-reconfigure', 'console-setup', 'locales'])
|