The dhcpd service does not have a correct return code on error in Red Hat Enterprise Linux 7
Issue
- When restarting the dhcpd service, there should be a non-zero return code if the service could not start.
- Journalctl output:
May 28 21:24:27 testmachine systemd[1]: Unit dhcpd.service entered failed state.
May 28 21:24:27 testmachine systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
- Command Execution:
# systemctl restart dhcpd.service
# echo $?
0
# systemctl start dhcpd.service
# echo $?
0
Environment
Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.