leeqicheng
Posts: 14
Joined: Wed May 14, 2014 2:21 pm

RPI 2 RC.local issue

Sat Oct 28, 2017 6:43 pm

Hey guys i know there have been lots of thread on this but i just couldnt figure out whats the problem because i did a clean install and i have the rc.load.error. Anybody having the issue and whats the work around trying to run a python or a shell script

raspberry pi v 2 1.1

Image

Thanks
LEE QICHENG

User avatar
DougieLawson
Posts: 38510
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RPI 2 RC.local issue

Sat Oct 28, 2017 6:47 pm

What happens if you open a LXterminal window and run sudo /etc/rc.local or sudo bash -x /etc/rc.local to get lots of debugging messages?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

leeqicheng
Posts: 14
Joined: Wed May 14, 2014 2:21 pm

Re: RPI 2 RC.local issue

Sat Oct 28, 2017 6:54 pm

DougieLawson wrote:
Sat Oct 28, 2017 6:47 pm
What happens if you open a LXterminal window and run sudo /etc/rc.local or sudo bash -x /etc/rc.local to get lots of debugging messages?
i gotten no such file found or directory but i have it

Image


If i run sudo /etc/rc.local
Image

if i run sudo bash -x /ect ...
Image
Last edited by leeqicheng on Sat Oct 28, 2017 7:03 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 38510
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RPI 2 RC.local issue

Sat Oct 28, 2017 7:00 pm

There's your error on line #23.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

leeqicheng
Posts: 14
Joined: Wed May 14, 2014 2:21 pm

Re: RPI 2 RC.local issue

Sat Oct 28, 2017 7:04 pm

DougieLawson wrote:
Sat Oct 28, 2017 7:00 pm
There's your error on line #23.
I dun think i have written anything on line 23 please enlighten me thanks

User avatar
DougieLawson
Posts: 38510
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RPI 2 RC.local issue

Sat Oct 28, 2017 7:08 pm

Look at the output from running sudo bash -x /etc/rc.local again in detail.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
rpdom
Posts: 16749
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: RPI 2 RC.local issue

Sat Oct 28, 2017 7:09 pm

You've been using a windows editor or something. It has changed the line endings from just a newline (NL = "\n") to CRNL ("\r\n") instead.

Try stripping out the unwanted CR characters. You can do this by installing the dos2unix package and running

Code: Select all

sudo dos2unix /etc/rc.local
or use something like sed to edit it

Code: Select all

sudo sed -i "s/\r//" /etc/rc.local

leeqicheng
Posts: 14
Joined: Wed May 14, 2014 2:21 pm

Re: RPI 2 RC.local issue

Sat Oct 28, 2017 7:16 pm

rpdom wrote:
Sat Oct 28, 2017 7:09 pm
You've been using a windows editor or something. It has changed the line endings from just a newline (NL = "\n") to CRNL ("\r\n") instead.

Try stripping out the unwanted CR characters. You can do this by installing the dos2unix package and running

Code: Select all

sudo dos2unix /etc/rc.local
or use something like sed to edit it

Code: Select all

sudo sed -i "s/\r//" /etc/rc.local
Yup that fix my problems thanks i will learn from this and keep this in mine thanks man

Return to “Beginners”