okay, some minor changes to the XML stuff. getting there

This commit is contained in:
2019-12-10 06:59:47 -05:00
parent c7ce23ff0f
commit 06c99221d2
8 changed files with 103 additions and 1244 deletions

View File

@@ -4,5 +4,18 @@ from . import users
from . import services
def main(system_xml):
pass
class Sys(object):
def __init__(self, chroot_base, system_xml):
self.xml = system_xml
self.chroot_base = chroot_base
self.locale = locales.Locale(self.chroot_base, self.xml.find('locales'))
self.tz = locales.Timezone(self.chroot_base, self.xml.attrib.get('timezone', 'UTC'))
self.user = users.UserDB(self.chroot_base, self.xml.find('rootPassword'), self.xml.find('users'))
self.services = services.ServiceDB(self.chroot_base, self.xml.find('services'))
def apply(self):
self.locale.writeConf()
self.tz.apply()
self.user.writeConf()
self.services.apply()
return()