hi
How can I run a scritp on boot in ClearOS 7.2 I use to put it in rc-local but that have change
it look likes, I can't get it to Work
CB
How can I run a scritp on boot in ClearOS 7.2 I use to put it in rc-local but that have change
it look likes, I can't get it to Work
CB
Share this post:
Responses (2)
-
Accepted Answer
My test system is the same. It looks like a bug with an easy fix. Add execute permissions to /etc/rc.d/rc.local:chmod 744 /etc/rc.d/rc.local
[edit]
I've seen some reports that this file can fire too early under systemd, or at least earlier than other services that your program/script may depend on. In that case you may need add a delay before the line which starts your program, or write a proper systemd service file where you can add start up constraints
[/edit] -
Accepted Answer
I filed a bug and it is effectively a wontfix. Note the comments at the top of the rc.local:
The problem is parallel execution of start up files with systemd which means that this file no longer necessarily executes at the end of startup, so, for example, it is not necessarily guaranteed that networking is up before rc.local runs. If what you are running from rc.local needs networking to be available, then it may fail. I think the recommended solution is to write your own systemd service. A PITA.#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »