create "done" file after processing

main
mirkobrombin 2 years ago
parent 87448ac5e9
commit 7d3e4cea15

@ -33,6 +33,7 @@ class Processor:
next_boot = [] next_boot = []
next_boot_script_path = os.path.expanduser("~/.local/org.vanillaos.FirstSetup.nextBoot") next_boot_script_path = os.path.expanduser("~/.local/org.vanillaos.FirstSetup.nextBoot")
next_boot_autostart_path = os.path.expanduser("~/.config/autostart/org.vanillaos.FirstSetup.nextBoot.desktop") next_boot_autostart_path = os.path.expanduser("~/.config/autostart/org.vanillaos.FirstSetup.nextBoot.desktop")
done_file = "/etc/vanilla-first-setup-done"
abroot_bin = shutil.which("abroot") abroot_bin = shutil.which("abroot")
logger.info("processing the following commands: \n%s" % logger.info("processing the following commands: \n%s" %
@ -113,6 +114,11 @@ class Processor:
f.write(f"{out_run}\n") f.write(f"{out_run}\n")
f.write("fi") f.write("fi")
# create the done file
f.write("if [ $? -eq 0 ]; then\n")
f.write(f"touch {done_file}\n")
f.write("fi\n")
f.flush() f.flush()
f.close() f.close()

Loading…
Cancel
Save