[systemd-devel] Unit reported as failed despite exit code from SuccessExitStatus

Nikolaus Rath Nikolaus at rath.org
Wed Apr 15 22:45:55 PDT 2015


Hello,

I don't quite understand this:

$ systemctl --user status autocommit-org.service 
● autocommit-org.service - Auto-commits changes to orgmode files.
   Loaded: loaded (/home/nikratio/.config/systemd/user/autocommit-org.service; static)
   Active: inactive (dead) since Wed 2015-04-15 22:42:13 PDT; 51s ago
 Main PID: 2820 (code=exited, status=1/FAILURE)

Apr 15 22:42:13 vostro systemd[2453]: Starting Auto-commits changes to orgmode fil.....
Apr 15 22:42:13 vostro hg[2820]: nothing changed
Apr 15 22:42:13 vostro systemd[2453]: Started Auto-commits changes to orgmode files..
Hint: Some lines were ellipsized, use -l to show in full.

$ cat /home/nikratio/.config/systemd/user/autocommit-org.service
[Unit]
Description=Auto-commits changes to orgmode files.

[Service]
Type = oneshot
WorkingDirectory = %h/lib/Dropbox/org
ExecStart = /usr/bin/hg commit -m "Autocommit."
SuccessExitStatus = 1

$ systemctl --version
systemd 215
+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR


Why is the unit reported as failed? Shouldn't status=1 be interpreted as
success?

Thanks,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


More information about the systemd-devel mailing list