All stages must be able to handle an input_dir argument, as we now either pass it to all or none for agiven run. Simply set it to 'None' if it is not provided. Signed-off-by: Tom Gundersen <teg@jklm.no>
13 lines
337 B
Python
Executable file
13 lines
337 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
import json
|
|
import os
|
|
import subprocess
|
|
|
|
def main(tree, input_dir, 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))
|