Skip to content

Commit 1ce844f

Browse files
committed
ephemeral: Fix execute unit
This one was subtle...at some point we moved over to Rust raw strings `r#` where we no longer needed `\\`. The next bug here is we were missing `After=`. The semantics of a plain `Requires=` without `After=` are very weak and systemd basically skipped over the missing device. Closes: #139 Signed-off-by: Colin Walters <[email protected]>
1 parent fe01aa0 commit 1ce844f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/kit/src/run_ephemeral.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,8 @@ WantedBy=sysinit.target
932932
let mut service_content = format!(
933933
r#"[Unit]
934934
Description=Execute Script Service
935-
Requires=dev-virtio\\x2dports-execute.device
935+
Requires=dev-virtio\x2dports-execute.device
936+
After=dev-virtio\x2dports-execute.device
936937
937938
[Service]
938939
Type=oneshot
@@ -948,7 +949,8 @@ StandardError=inherit
948949
let service_finish = r#"[Unit]
949950
Description=Execute Script Service Completion
950951
After=bootc-execute.service
951-
Requires=dev-virtio\\x2dports-executestatus.device
952+
Requires=dev-virtio\x2dports-executestatus.device
953+
After=dev-virtio\x2dports-executestatus.device
952954
953955
[Service]
954956
Type=oneshot

0 commit comments

Comments
 (0)