Fwd: rc.local and systemd
Michael Biebl
email at michaelbiebl.de
Sat May 23 20:04:27 BST 2015
Am 23.05.2015 um 20:56 schrieb Rainer Dorsch:
> Am Montag, 18. Mai 2015, 22:21:42 schrieb Michael Biebl:
>> As you can also see, powertop exits with a non-zero return code. Since
>> /etc/rc.local uses "set -e", your script exits at this point and the
>> service is marked as failed.
..
> Hmm....seems that systemd does not define the TERM variable. Defining that at
> least makes powertop performing the expected settings. Nevertheless I am still
> wondering why it has the failed status, rc.local has an hard "exit 0" return
> code (?) :
The "exit 0" is useless since, as already explained, the script use "set
-e". If a command returns a non-zero exit status, the script will stop
at this point and return that exit status. Which means you'll never
reach exit 0 in such a case.
From "help set"
-e Exit immediately if a command exits with a non-zero status.
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150523/8dedfe3d/attachment-0002.sig>
More information about the Pkg-systemd-maintainers
mailing list