Re: Making rc.local work on F20.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2014-10-25 at 21:25 -0400, Derrik Walker v2.0 wrote:
:
cd /etc
echo '#!/bin/bash' > rc.d/rc.local
ln -s rc.d/rc.local rc.local
chmod 755 rc.d/rc.local

As noted, previously you should use 'vi /etc/rc.d/rc.local' to add the '#!/bin/bash' line and any testing lines (like 'touch /var/tmp/hello')

After re-booting, check that the file /usr/lib/systemd/system/rc-local.service exists. It is *supposed* to be created when/if /etc/rc,d/rc.local exists and is executable *but* it may not. If it does not, then rc-local.service should contain:
*********************************
# rc-local.service
<snip>
# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
[Unit]
Description=/etc/rc.d/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.d/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.d/rc.local start
TimeoutSec=0
RemainAfterExit=yes
SysVStartPriority=99
**********************************

You don't actually need the 'start' on the 4th last line. With this file in place and a systemctl enable rc-local.service' you should be good to go.

Note:
In my experience, this method is NOT stable. My guess is that, although the priority of 99 is supposed to be last, systemd has started processes which have not yet completed, when this is called, and things just fail. In particular, modules may get loaded in the wrong order, so that the hardware 'fails'. This sort of failure may not even be apparent in dmesg etc.

I have had success and stable results using the following line in *root's* crontab. (See Extensions in 'man 8 crontab')

@reboot  /etc/rc.d/rc.local

And disabling/masking the rc-local.service file so it is still there but not used.

This seems to depend entirely upon the hardware connected/installed in the computer. My desktop machine is fine with rc-local.service, but the mythtv box at home requires use of the crontab work-around to boot reliably with everything properly loaded. Note that I have to remove and re-install modules in rc.local to ensure the correct loading order. YMMV


             R. Geoffrey Newbury			

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
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




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux