Skip to content

Commit a3c1f8a

Browse files
committed
fix: Avoid autostart service being executed twice
When ExecCondition returns an exit code that is non-zero but not 255, the service is marked as "skipped" rather than "failed". The skipped state may be treated as success by some versions of systemd, thereby triggering OnSuccess! Log: as title Pms: BUG-343321
1 parent 0f6763f commit a3c1f8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

systemd/dde-session-pre.target.wants/[email protected]

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ OnSuccess=dde-lock.service [email protected] dde-autostart
1515
Slice=session.slice
1616
Type=notify
1717
# only in quick login mode and x11
18-
ExecCondition=/bin/sh -c '[ "$DDE_QUICKLOGIN" = "true" ] || exit 2'
19-
ExecCondition=/bin/sh -c '[ "$XDG_SESSION_TYPE" = "%I" ] || exit 3'
18+
ExecCondition=/bin/sh -c '[ "$DDE_QUICKLOGIN" = "true" ] || exit 255'
19+
ExecCondition=/bin/sh -c '[ "$XDG_SESSION_TYPE" = "%I" ] || exit 255'
2020
ExecStart=/usr/bin/dde-quick-login
2121
SuccessExitStatus=0
2222
Restart=on-failure

0 commit comments

Comments
 (0)