Skip to content

Commit 3ea5f5e

Browse files
scyTim Weber
and
Tim Weber
authored
facts/systemd: treat mounted systemd units as active
Co-authored-by: Tim Weber <[email protected]>
1 parent 93cd1c0 commit 3ea5f5e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pyinfra/facts/systemd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def requires_command(self, *args, **kwargs) -> str:
6464
default = dict
6565

6666
state_key = "SubState"
67-
state_values = ["running", "waiting", "exited", "listening"]
67+
state_values = ["running", "waiting", "exited", "listening", "mounted"]
6868

6969
@override
7070
def command(

tests/facts/systemd.SystemdStatus/services.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212
"SubState=dead",
1313
"",
1414
"Id=ebtables.timer",
15-
"SubState=exited"
15+
"SubState=exited",
16+
"",
17+
"Id=mnt-foo.mount",
18+
"SubState=mounted"
1619
],
1720
"fact": {
1821
"lvm2-activation.service": false,
1922
"lvm2-lvmetad.service": true,
2023
"lvm2-lvmpolld.service": false,
21-
"ebtables.timer": true
24+
"ebtables.timer": true,
25+
"mnt-foo.mount": true
2226
}
2327
}

0 commit comments

Comments
 (0)