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__