stage api: pass options in a separate key
This avoids name clashes between osbuild and stage options.
This commit is contained in:
parent
2d487fe685
commit
92f3af94f6
12 changed files with 77 additions and 47 deletions
|
|
@ -4,10 +4,13 @@ import json
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
def main(tree, input_dir, enabled_services):
|
||||
def main(tree, options):
|
||||
enabled_services = options["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))
|
||||
args = json.load(sys.stdin)
|
||||
r = main(args["tree"], args["options"])
|
||||
sys.exit(r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue