Le 03/09/2016 22:59, François Patte a écrit :
Bonsoir,
I try to enable rc-local service:
1- I created /etc/rc.d/rc.local file:
#!/bin/bash
iptables -I INPUT -p udp --sport 1900 -j ACCEPT
2- I chmoded /etc/rc.d/rc.local
chmod u+x /etc/rc.d/rc.local
But the service won't start:
# systemctl status rc-local.service ● rc-local.service - /etc/rc.d/rc.local Compatibility Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static; vendor preset: disabled) Active: failed (Result: exit-code) since sam. 2016-09-03 22:49:00 CEST; 25s ago Process: 8189 ExecStart=/etc/rc.d/rc.local start (code=exited, status=203/EXEC)
sept. 03 22:49:00 berrichon systemd[1]: Starting /etc/rc.d/rc.local Compatibility... sept. 03 22:49:00 berrichon systemd[1]: rc-local.service: Control process exited, code=exited ...203 sept. 03 22:49:00 berrichon systemd[1]: Failed to start /etc/rc.d/rc.local Compatibility. sept. 03 22:49:00 berrichon systemd[1]: rc-local.service: Unit entered failed state. sept. 03 22:49:00 berrichon systemd[1]: rc-local.service: Failed with result 'exit-code'. Hint: Some lines were ellipsized, use -l to show in full.
On other nstall of fedora 23 this works.... Why not on this computer?
Just unwanted spaces before and after #!/bin/bash
The script works when executed for itself, but it seems that systemd is quite supercilious about that spaces and very avaricious to give some hints about the error encountered!
Thank you for helping.