On 10/28/14 19:08, Ed Greshko wrote:
> On 10/28/14 17:18, Angelo Moreschini wrote:
>> After I read this announcement, I create the the file rc.local and I made it 
>> executable:
>>
>> [angelo_dev@zorro rc.d]$ ls -l /etc/rc.d/rc.local
>>
>> -rwxr-xr-x. 1 root root 1262 Oct 27 12:18 /etc/rc.d/rc.local
>>
>>
>> But, doing some tests, I saw that the scripts stored inside rc.local not run 
>> at boot, ...on my computer.
>>
> I don't believe you have determined that it is not getting run at boot time 
> as opposed to having a failure in the script itself.
>
> As I've mentioned in a previous thread....  You should have this at the top 
> of your rc.local
>
> #!/bin/bash
> /bin/touch /tmp/hello
>
> Then after boot check that there is a file in /tmp with the name "hello".
>
> If there is....the script is being run.
>
> How many commands are in your script?
>
> It may be helpful to direct standard error to a file for each command as it 
> seems to be a small script.
>
> So do something like this.....
>
> some command   2>  /tmp/first-error
> next command 2>  /tmp/second-error
>
> Then check /tmp/first-error and /tmp/second-error for errors.....
>
> You may also want to simply post the contents of your rc.local for others to 
> examine for potential problems.
>
>
And alternative to this is to have this at the top of your rc.local file....

#!/bin/bash
exec 2> /tmp/rc.local.log      # send stderr from rc.local to a log file
exec 1>&2                      # send stdout to the same log file
set -x                         # tell sh to display commands before execution

And then check /tmp/rc.local.log

-- 
If you can't laugh at yourself, others will gladly oblige.
-- 
users mailing list
users@lists.fedoraproject.org
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

Reply via email to