fix fixup_directory managment
- box depenedent fixups have the form to_system_<box.typ> - name of fixup directories have to determined after reading config
This commit is contained in:
1 parent
9f257a9e97
commit
98240ee288
9 files changed
+6
-2
No files matched your search
+6
-2
@@ -321,7 +321,6 @@ installs = set()
|
||||
box = BoxInfo()
|
||||
box.fixup_dirs = [ # (src, dst, as_root)
|
||||
(TOOLS / 'to_system', Path('/'), True),
|
||||
(TOOLS / f'to_system_{box.typ}', Path('/'), True),
|
||||
(TOOLS / 'to_home', Path.home(), False),
|
||||
]
|
||||
box.hostname_changed = False
|
||||
@@ -592,7 +591,8 @@ def walk_dir(action, srcpath, dstroot, files):
|
||||
print('ERROR: %s in %s, but also in repo -> ignored' % (fname, DEL))
|
||||
else:
|
||||
to_delete.append(fname)
|
||||
action.delete(to_delete)
|
||||
if to_delete:
|
||||
action.delete(to_delete)
|
||||
if missing:
|
||||
action.missing(missing)
|
||||
|
||||
@@ -862,6 +862,10 @@ def handle_config():
|
||||
' net.ifnames=0'):
|
||||
do_cmd('update-grub')
|
||||
|
||||
boxsys = TOOLS / f'to_system_{box.typ}', Path('/'), True
|
||||
if boxsys not in box.fixup_dirs:
|
||||
box.fixup_dirs.append(boxsys)
|
||||
|
||||
result = [f'config file:\n {cfgfile}']
|
||||
for section, section_dict in config.items():
|
||||
result.append(section)
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user