Unix Technical Forum

"/usr/sbin/pppoe-start" in rc.local doesn't do, but "sh rc.local" as a root does??

This is a discussion on "/usr/sbin/pppoe-start" in rc.local doesn't do, but "sh rc.local" as a root does?? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi! I am trying to make Slackware 11 connect to the internet each time i boot the system automatically. ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 09:25 PM
morb
 
Posts: n/a
Default "/usr/sbin/pppoe-start" in rc.local doesn't do, but "sh rc.local" as a root does??

Hi!
I am trying to make Slackware 11 connect to the internet each time i
boot the system automatically. I've put this:

/usr/sbin/pppoe-start

into my rc.local script (as it supposedly should work). When slackware
boots I get

. . Connected!

text in the console, last thing before login. The problem is that the
connection doesn't work. When I start lynx, it says "unable to connect
to host".
pppoe-status says :

Link is attached to ppp0, but ppp0 is down.

Then I can shut down the connection by pppoe-stop, and execute the
rc.local script "sh rc.local", and it works, slack is connected.

Can anyone explain this to me or throw me some link?
Thanks in advance.

morb

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 09:25 PM
Grant
 
Posts: n/a
Default Re: "/usr/sbin/pppoe-start" in rc.local doesn't do, but "sh rc.local" as a root does??

On 22 Mar 2007 15:13:45 -0700, "morb" <stefanicivan@gmail.com> wrote:

>Hi!
>I am trying to make Slackware 11 connect to the internet each time i
>boot the system automatically. I've put this:
>
> /usr/sbin/pppoe-start
>

Don't have an answer other than to say I have pppoe-start in
/etc/rc.d/rc.local and it works for me. I have ip-up and ip-down
write log files in /var/log -- maybe you could do that to get an
idea what is going on?

$ cat /etc/ppp/ip-up
#!/bin/bash
#
# /etc/ppp/ip-up
#
# Copyright (C) 2004,2005 Grant Coady
#
# environment vars:
# DEVICE
# IFNAME
# IPLOCAL
# IPREMOTE
# PEERNAME
# SPEED
# ORIG_UID
# PPPLOGNAME
# CONNECT_TIME
# BYTES_SENT
# BYTES_RCVD
# LINKNAME
# DNS1
# DNS2

log="/var/log/rp-pppoe"

echo -en "$(date "+%F_%T\t%s")\t" >> $log
echo -e "up\t$IFNAME\t$IPLOCAL\t$IPREMOTE" >> $log

# set default route
/sbin/route add default gw ${IPREMOTE} netmask 0.0.0.0 metric 1

# bring up firewall
/etc/rc.d/rc.firewall restart $IFNAME $IPLOCAL > /var/log/ip-up
#
# kick ntp
/usr/sbin/ntpd
#

Grant.
--
http://bugsplatter.mine.nu/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 09:25 PM
No_One
 
Posts: n/a
Default Re: "/usr/sbin/pppoe-start" in rc.local doesn't do, but "sh rc.local" as a root does??

On 2007-03-22, morb <stefanicivan@gmail.com> wrote:
> Hi!
> I am trying to make Slackware 11 connect to the internet each time i
> boot the system automatically. I've put this:
>
> /usr/sbin/pppoe-start
>
> into my rc.local script (as it supposedly should work). When slackware
> boots I get
>
> . . Connected!
>
> text in the console, last thing before login. The problem is that the
> connection doesn't work. When I start lynx, it says "unable to connect
> to host".
> pppoe-status says :
>
> Link is attached to ppp0, but ppp0 is down.
>
> Then I can shut down the connection by pppoe-stop, and execute the
> rc.local script "sh rc.local", and it works, slack is connected.
>
> Can anyone explain this to me or throw me some link?
> Thanks in advance.


Sequence might be the issue....the connection is attempted to earlyin the
start up sequence.


ken
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 09:26 PM
morb
 
Posts: n/a
Default Re: "/usr/sbin/pppoe-start" in rc.local doesn't do, but "sh rc.local" as a root does??

On Mar 23, 12:53 am, No_One <no_one@no_where.com> wrote:
> On 2007-03-22, morb <stefanici...@gmail.com> wrote:
>
>
>
> > Hi!
> > I am trying to make Slackware 11 connect to the internet each time i
> > boot the system automatically. I've put this:

>
> > /usr/sbin/pppoe-start

>
> > into my rc.local script (as it supposedly should work). When slackware
> > boots I get

>
> > . . Connected!

>
> > text in the console, last thing before login. The problem is that the
> > connection doesn't work. When I start lynx, it says "unable to connect
> > to host".
> > pppoe-status says :

>
> > Link is attached to ppp0, but ppp0 is down.

>
> > Then I can shut down the connection by pppoe-stop, and execute the
> > rc.local script "sh rc.local", and it works, slack is connected.

>
> > Can anyone explain this to me or throw me some link?
> > Thanks in advance.

>
> Sequence might be the issue....the connection is attempted to earlyin the
> start up sequence.
>
> ken



I don't agree.
> . . Connected ! !


Was the last thing in the startup sequence before login... Is there
some script that I could make that would execute itself after user
logs in?

I don't bother connecting with #pppoe-start but my family does...


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 09:26 PM
No_One
 
Posts: n/a
Default Re: "/usr/sbin/pppoe-start" in rc.local doesn't do, but "sh rc.local" as a root does??

On 2007-03-24, morb <stefanicivan@gmail.com> wrote:
>> On Mar 23, 12:53 am, No_One <no_one@no_where.com> wrote:


<deleted>

>>
>> Sequence might be the issue....the connection is attempted to earlyin the
>> start up sequence.
>>
>> ken

>
>
> I don't agree.
> . . Connected ! !


Just for the record, just because it says "connected" doesn't mean it made a
usable connection. For example, if you don't have the printer set correctly
an app might claim the doc has been printed but....no printed sheets out of
the printer.

In addition, connected doesn't always mean logged into the ISP.

I didn't look, but I'm sure there's a debug option that will write to some
sort of file that might give you a clue as to the problem.

>
> Was the last thing in the startup sequence before login... Is there
> some script that I could make that would execute itself after user
> logs in?


Run it out of the bash login script or when .bashrc runs, these are options.

ken


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com