debian-forge/stages/io.weldr.systemd
Tom Gundersen cdcfa1277e osbuild: make state handling generic
Rather than treating the dnf-cache specially, give each stage its
own state directory that they can reuse. This should obviously be
used with care by the stages in order to make the builds
reproducible.
2019-06-06 19:37:49 +02:00

13 lines
333 B
Python
Executable file

#!/usr/bin/python3
import json
import os
import subprocess
def main(tree, state, enabled_services):
for service in enabled_services:
subprocess.run([f"{tree}/usr/bin/systemctl", "--root", tree, "enable", service], check=True)
if __name__ == '__main__':
options = json.load(sys.stdin)
sys.exit(main(**options))