From 98240ee2882453cd89cf5ea91b34681638d9f5df Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Mon, 2 Nov 2026 18:09:03 +0100 Subject: [PATCH] fix fixup_directory managment - box depenedent fixups have the form to_system_ - name of fixup directories have to determined after reading config --- install.py | 8 ++++++-- .../boot/firmware/config.txt | 0 .../etc/udev/rules.d/__to_delete__ | 0 .../boot => to_system_ionopi/boot/firmware}/config.txt | 0 .../etc/udev/rules.d/99-ionopi.rules | 0 .../etc/udev/rules.d/__to_delete__ | 0 .../boot => to_system_ionopimax/boot/firmware}/config.txt | 0 .../etc/udev/rules.d/99-ionopimax.rules | 0 .../etc/udev/rules.d/__to_delete__ | 0 9 files changed, 6 insertions(+), 2 deletions(-) rename {to_dual-eth-rpi => to_system_dual-eth-rpi}/boot/firmware/config.txt (100%) rename to_dual-eth-rpi/etc/udev/rules.d/__delete__ => to_system_dual-eth-rpi/etc/udev/rules.d/__to_delete__ (100%) rename {to_ionopi/boot => to_system_ionopi/boot/firmware}/config.txt (100%) rename {to_ionopi => to_system_ionopi}/etc/udev/rules.d/99-ionopi.rules (100%) rename to_ionopi/etc/udev/rules.d/__delete__ => to_system_ionopi/etc/udev/rules.d/__to_delete__ (100%) rename {to_ionopimax/boot => to_system_ionopimax/boot/firmware}/config.txt (100%) rename {to_ionopimax => to_system_ionopimax}/etc/udev/rules.d/99-ionopimax.rules (100%) rename to_ionopimax/etc/udev/rules.d/__delete__ => to_system_ionopimax/etc/udev/rules.d/__to_delete__ (100%) diff --git a/install.py b/install.py index 289bab4..ae5144f 100755 --- a/install.py +++ b/install.py @@ -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) diff --git a/to_dual-eth-rpi/boot/firmware/config.txt b/to_system_dual-eth-rpi/boot/firmware/config.txt similarity index 100% rename from to_dual-eth-rpi/boot/firmware/config.txt rename to to_system_dual-eth-rpi/boot/firmware/config.txt diff --git a/to_dual-eth-rpi/etc/udev/rules.d/__delete__ b/to_system_dual-eth-rpi/etc/udev/rules.d/__to_delete__ similarity index 100% rename from to_dual-eth-rpi/etc/udev/rules.d/__delete__ rename to to_system_dual-eth-rpi/etc/udev/rules.d/__to_delete__ diff --git a/to_ionopi/boot/config.txt b/to_system_ionopi/boot/firmware/config.txt similarity index 100% rename from to_ionopi/boot/config.txt rename to to_system_ionopi/boot/firmware/config.txt diff --git a/to_ionopi/etc/udev/rules.d/99-ionopi.rules b/to_system_ionopi/etc/udev/rules.d/99-ionopi.rules similarity index 100% rename from to_ionopi/etc/udev/rules.d/99-ionopi.rules rename to to_system_ionopi/etc/udev/rules.d/99-ionopi.rules diff --git a/to_ionopi/etc/udev/rules.d/__delete__ b/to_system_ionopi/etc/udev/rules.d/__to_delete__ similarity index 100% rename from to_ionopi/etc/udev/rules.d/__delete__ rename to to_system_ionopi/etc/udev/rules.d/__to_delete__ diff --git a/to_ionopimax/boot/config.txt b/to_system_ionopimax/boot/firmware/config.txt similarity index 100% rename from to_ionopimax/boot/config.txt rename to to_system_ionopimax/boot/firmware/config.txt diff --git a/to_ionopimax/etc/udev/rules.d/99-ionopimax.rules b/to_system_ionopimax/etc/udev/rules.d/99-ionopimax.rules similarity index 100% rename from to_ionopimax/etc/udev/rules.d/99-ionopimax.rules rename to to_system_ionopimax/etc/udev/rules.d/99-ionopimax.rules diff --git a/to_ionopimax/etc/udev/rules.d/__delete__ b/to_system_ionopimax/etc/udev/rules.d/__to_delete__ similarity index 100% rename from to_ionopimax/etc/udev/rules.d/__delete__ rename to to_system_ionopimax/etc/udev/rules.d/__to_delete__