stages/systemd: minor fixes
We cannot use the tool from within the tree unless we chroot (library versions ay be wring etc). If possible we want to always use tools from the build image, in order to avoid forcing the contenst of the target tree, so do that instead. Finally, add a missing include. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
b38506a702
commit
4b69d02dc8
1 changed files with 2 additions and 1 deletions
|
|
@ -3,12 +3,13 @@
|
|||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
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)
|
||||
subprocess.run([f"systemctl", "--root", tree, "enable", service], check=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = json.load(sys.stdin)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue