Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/conf.d/local.start not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
statmobile
Apprentice
Apprentice


Joined: 16 Jul 2004
Posts: 286
Location: Chapel Hill, NC

PostPosted: Sat Feb 12, 2005 11:02 pm    Post subject: /etc/conf.d/local.start not working Reply with quote

I have a neat little script I use to forward my sshd port to another server. It really only needs to be run when I reboot the machine, so I called it from
Code:

/etc/conf.d/local.start

Now I'm noticing that it now longer works. What gives? Is anybody else having this problem?
_________________
Comp Specs:
Asus A7V(rev1.02)|AMDXP2100+@1.7GHz|Creative SB128PCI|32MB NVIDIA/TNT2AGP|512MBPC-133
Back to top
View user's profile Send private message
transient
l33t
l33t


Joined: 13 Jan 2005
Posts: 759

PostPosted: Sun Feb 13, 2005 12:22 am    Post subject: Reply with quote

What exactly does your /etc/conf.d/local.start contain?
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Sun Feb 13, 2005 12:59 am    Post subject: Reply with quote

Are you sure local is in your default runlevel?
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
statmobile
Apprentice
Apprentice


Joined: 16 Jul 2004
Posts: 286
Location: Chapel Hill, NC

PostPosted: Sun Feb 13, 2005 6:21 pm    Post subject: Reply with quote

local.start
Code:

sudo -H -u username screen /home/blopes/bin/connect.sh 1>&2


I've tried it both with, and without the '1>&2', without was working before this whole problem arose.
If I run the connect.sh on it's own, it runs fine. It's just that it doesn't start automatically.

codergeek42, I'm not sure if it's in the default runlevel, I didn't intentionally remove it from there. Is there a way I can check this?
_________________
Comp Specs:
Asus A7V(rev1.02)|AMDXP2100+@1.7GHz|Creative SB128PCI|32MB NVIDIA/TNT2AGP|512MBPC-133
Back to top
View user's profile Send private message
transient
l33t
l33t


Joined: 13 Jan 2005
Posts: 759

PostPosted: Sun Feb 13, 2005 8:23 pm    Post subject: Reply with quote

Code:
rc-status default
will output all services in the default runlevel.
If local isnt there, then it quite probably got deleted during a baselayout update or similar. To re-add it,
Code:
rc-update add local default
Back to top
View user's profile Send private message
statmobile
Apprentice
Apprentice


Joined: 16 Jul 2004
Posts: 286
Location: Chapel Hill, NC

PostPosted: Sun Feb 13, 2005 8:54 pm    Post subject: Reply with quote

Yes, apparently it was off. But when I tried adding it to default, I got
Code:

 * local already installed in runlevel default; skipping

Does this mean that it should restart next time I reboot? When I ran
Code:

/etc/init.d/local start

It did run my shell script. Hmmm, so the code is alright, it's just an issue that this should be in default runlevel. Any ideas why it doesn't seem to start even though it is in default apparently? I guess I don't care all that much, as long as it runs when I reboot. I just deleted it, and then added it back in to the default level. Hopefully this will work.
_________________
Comp Specs:
Asus A7V(rev1.02)|AMDXP2100+@1.7GHz|Creative SB128PCI|32MB NVIDIA/TNT2AGP|512MBPC-133
Back to top
View user's profile Send private message
transient
l33t
l33t


Joined: 13 Jan 2005
Posts: 759

PostPosted: Mon Feb 14, 2005 12:39 am    Post subject: Reply with quote

It should work.
Back to top
View user's profile Send private message
statmobile
Apprentice
Apprentice


Joined: 16 Jul 2004
Posts: 286
Location: Chapel Hill, NC

PostPosted: Mon Feb 14, 2005 2:19 am    Post subject: Reply with quote

Apparently it was a problem calling screen from my local.start commands given above. I was getting the following error when it was trying to start up local:
Code:

Cannot open your terminal '/dev/console' -please check

I read somewhere to chown username /dev/console, and after doing this it runs fine. Should I have done this, I don't want to expose myself here, just to get this to run.

Ona a side note:
I noticed this error when sitting at the machine during boot up, and when it tries starting all the modules. I am aware of dmesg to see the kernel startup results, but is there a way to view those short diagnositics of the scripts when booting?
_________________
Comp Specs:
Asus A7V(rev1.02)|AMDXP2100+@1.7GHz|Creative SB128PCI|32MB NVIDIA/TNT2AGP|512MBPC-133
Back to top
View user's profile Send private message
transient
l33t
l33t


Joined: 13 Jan 2005
Posts: 759

PostPosted: Mon Feb 14, 2005 5:05 am    Post subject: Reply with quote

What does the script have in it?
If its just ordinary commands, you could put it into the local.start directly
Back to top
View user's profile Send private message
statmobile
Apprentice
Apprentice


Joined: 16 Jul 2004
Posts: 286
Location: Chapel Hill, NC

PostPosted: Mon Feb 14, 2005 5:16 am    Post subject: Reply with quote

Removing a lot of the useless stuff in the script, it comes down to
Code:

ssh -v -g -R 35123:remote.server.com:35122 local.server.com -N

This just forwards my ssh port onto the remote server, because I'm trapped behind a firewall that I can't open. I like to have it open in screen, so that i can keep an eye on what's going on whenever I log into the machine. Using screen is almost imperative for that matter, and that seems to be the problem.
_________________
Comp Specs:
Asus A7V(rev1.02)|AMDXP2100+@1.7GHz|Creative SB128PCI|32MB NVIDIA/TNT2AGP|512MBPC-133
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum