On 09/05/2016 05:07 AM, oe Zeff <j...@zeff.us> wrote:

Subject: Re: unable to start rc-local.service[SOLVED]
To: Community support for Fedora users <users@lists.fedoraproject.org>
Message-ID: <57cc87ea.3090...@zeff.us>
Content-Type: text/plain; charset=utf-8; format=flowed

On 09/04/2016 01:34 PM, François Patte wrote:
> 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.
Interesting.  I have some blank lines in mine, to improve readability,
but not there.  I'll have to keep that in mind for future reference.
It's rather like mount insisting that every line in /etc/fstab end in a
newline, even the last one, but not giving a clear error message if you
forget it.

And, it's occurred to me that there's a way to get what's needed here
done that's easier because it doesn't try to make the same change during
every boot.  Alas, I've gotten the impression that my advice isn't
wanted in this thread, so I'll leave it as an exercise for the reader.

Lennart Poettering has a hate for rc.local. He discusses that somewhere in his systemd blog. For whatever reason, he dislikes it and thinks that no-one should use it, or be able to use it. So you must sacrifice the correct animal, at the exactly correct time, for it to work.

And of course, just as with pulseaudio, systemd does not give meaningful or useful error messages.

Since most items in rc.local are run-one-time items, the answer is to NOT USE SYSTEMD.

Create your rc.local file, and chmod it u+x, and then add the following to your (root) crontab: @reboot /etc/rc.d/rc.local

@reboot in a cron does exactly what it implies: it runs, once at boot time. See 'man 5 crontab'

Problem solved without systemd.

--
Geoff
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to