LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-16-2005, 08:01 AM   #1
justin_p
Member
 
Registered: Jan 2004
Location: Virginia, USA
Distribution: slack 13; I've used it all :)
Posts: 433

Rep: Reputation: 30
Permissions for /etc/rc.d/rc.local


I think that I am having problems with my /etc/rc.d/rc.local. I have put adsl-start in the script. It did work until Monday when I updated my box to the new packages for current. I inadvertently replaced a few conf by nothing affecting the network configuration, or so I thought. Upon a reboot the adsl connection did not come up automatically. But if I run /etc/rc.d/rc.local start after boot it comes up fine. I tried changing the permissions by chmod +x /etc/rc.d/rc.local. What should the file permissions be set at to bring up the script at start up? I boot into run level 4. Thanks.

Last edited by justin_p; 06-16-2005 at 08:03 AM.
 
Old 06-16-2005, 08:15 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I don't think it is permission problem, I would try
add a delay before execute the command like :

(sleep 5 && adsl-start) &
 
Old 06-16-2005, 08:40 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: Permissions for /etc/rc.d/rc.local

Quote:
Originally posted by justin_p
I think that I am having problems with my /etc/rc.d/rc.local. I have put adsl-start in the script. It did work until Monday when I updated my box to the new packages for current. I inadvertently replaced a few conf by nothing affecting the network configuration, or so I thought. Upon a reboot the adsl connection did not come up automatically. But if I run /etc/rc.d/rc.local start after boot it comes up fine. I tried changing the permissions by chmod +x /etc/rc.d/rc.local. What should the file permissions be set at to bring up the script at start up? I boot into run level 4. Thanks.
Make sure the rc.local script is being excecuted or called upon by your rc.M script.. preferrably at the end of the script..
 
Old 06-16-2005, 06:27 PM   #4
justin_p
Member
 
Registered: Jan 2004
Location: Virginia, USA
Distribution: slack 13; I've used it all :)
Posts: 433

Original Poster
Rep: Reputation: 30
well, I changed the rc.local around similar to what keefaz suggested:

#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local setup commands in here:

sleep 5 && adsl-start &


trickykid,

I check the rc.M file and it appears to be calling ti up at the end:

#!/bin/sh
#
***Removed Big Chunk***

# Start the local setup procedure.
if [ -x /etc/rc.d/rc.local ]; then
. /etc/rc.d/rc.local
fi

# All done.


I got the same result. Any clues?

Last edited by justin_p; 06-17-2005 at 09:26 AM.
 
Old 06-16-2005, 06:56 PM   #5
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100
Maybe some terminal output congestion ?
I don't know/never used this script but did you tried to call it with suppressed output like this
Code:
adsl-start &> /dev/null &
?
 
Old 06-16-2005, 08:36 PM   #6
justin_p
Member
 
Registered: Jan 2004
Location: Virginia, USA
Distribution: slack 13; I've used it all :)
Posts: 433

Original Poster
Rep: Reputation: 30
adsl-start works fine. it's the rc.local that is not working correctly.
 
Old 06-16-2005, 09:27 PM   #7
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
Quote:
Originally posted by justin_p

I check the rc.M file and it appears to be calling ti up at the end:

well...( really, no offence but... ) he asked you to check it, you don't have to post such files.
( we all got the same one i guess... )

egag
 
Old 06-16-2005, 09:54 PM   #8
justin_p
Member
 
Registered: Jan 2004
Location: Virginia, USA
Distribution: slack 13; I've used it all :)
Posts: 433

Original Poster
Rep: Reputation: 30
egag,

you never what can help. That is what we are all here for.
 
Old 06-16-2005, 10:22 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
So is rc.local even executable?

chmod +x rc.local

And have you tried putting the full path to your adsl-start script/command?

If you can run it after you boot and it works, perhaps you should put an echo line in there to test if its being executed or not.

Add something like this to your rc.local file:

Code:
echo "Starting ADSL Services... "

CONFIG=/etc/ppp/pppoe.conf

/usr/sbin/adsl-status $CONFIG > /dev/null 2>&1
And you can test it by running..

Code:
sh -x /etc/rc.d/rc.local
Which will print out what its doing from the script, etc. But you should really be using a script like this I found from googling.. http://www.hupo.org.cn/docs/linuxdoc...3.5/adsl-start

Then you can specify it from rc.M and have it separate from your rc.local file.
 
Old 06-17-2005, 07:02 AM   #10
justin_p
Member
 
Registered: Jan 2004
Location: Virginia, USA
Distribution: slack 13; I've used it all :)
Posts: 433

Original Poster
Rep: Reputation: 30
rc.local is definitely exectuable. I am just not sure why it is not running on boot. My adsl-start file look just like the one in the link. I am going to reboot with those options you stated for the rc.local. My report will follow.

Aftering adding the lines:

echo "Starting ADSL Services... "

CONFIG=/etc/ppp/pppoe.conf

/usr/sbin/adsl-status $CONFIG > /dev/null 2>&1

to the rc.local I am able to see the "Starting ADSL Services...." prior to the start of X. But I got the same result. I run rc.local manually, no problem.

Last edited by justin_p; 06-17-2005 at 07:11 AM.
 
Old 06-17-2005, 08:04 AM   #11
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100
Usualy there is the only difference between running rc.local from multiuser startup script rc.M and from interactive shell in shell startup scripts so looking into them may help (depends on used shell: /etc/profile, ~/.profile, ~/.bash_profile, ~/.bash_login, ~/.cshrc, ~/.login, ...). Maybe some environment setting is required ?
 
Old 06-17-2005, 09:18 AM   #12
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
Quote:
Originally posted by justin_p
egag,

you never what can help. That is what we are all here for.
yes ok...i didn't mean anything wrong...
just pain in my finger from scrolling...

but the sripts all are executed, so i think you'll need to give it a small time out
as keefaz wrote
like:

--------------
sleep 5
echo "Starting ADSL Services... "

CONFIG=/etc/ppp/pppoe.conf

/usr/sbin/adsl-status $CONFIG > /dev/null 2>&1
--------------

( or do you have that allready ? )

egag
 
Old 06-17-2005, 09:26 AM   #13
justin_p
Member
 
Registered: Jan 2004
Location: Virginia, USA
Distribution: slack 13; I've used it all :)
Posts: 433

Original Poster
Rep: Reputation: 30
I will try adding that.
 
Old 06-17-2005, 08:45 PM   #14
justin_p
Member
 
Registered: Jan 2004
Location: Virginia, USA
Distribution: slack 13; I've used it all :)
Posts: 433

Original Poster
Rep: Reputation: 30
I changed my rc.local to this:

#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local setup commands in here:

echo "Starting ADSL Services... "

adsl-start

echo "..Connected"


But during boot it timed out and then displayed the connected part. When is ran the script for the CLI it worked perfectly. Weird. I am kinda at a loss.
 
Old 06-17-2005, 08:57 PM   #15
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
no news on the " sleep 5 " addition ?

egag
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
permissions error for lib/MT/FileMgr/Local.pm bindweb Linux - Security 1 06-10-2005 03:35 AM
/usr/local/firefox permissions rose_bud4201 Linux - Software 2 05-18-2005 10:08 PM
samba permissions local/remote Astro Slackware 1 04-26-2005 12:22 AM
mounting local hard drive, permissions plasticus Linux - Hardware 5 02-15-2004 03:14 PM
Write permissions in local on ML 9.1 sw4eternity Linux - Newbie 1 11-03-2003 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration