View previous topic :: View next topic |
Author |
Message |
statmobile Apprentice
Joined: 16 Jul 2004 Posts: 286 Location: Chapel Hill, NC
|
Posted: Sat Feb 12, 2005 11:02 pm Post subject: /etc/conf.d/local.start not working |
|
|
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 |
|
|
transient l33t
Joined: 13 Jan 2005 Posts: 759
|
Posted: Sun Feb 13, 2005 12:22 am Post subject: |
|
|
What exactly does your /etc/conf.d/local.start contain? |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Sun Feb 13, 2005 12:59 am Post subject: |
|
|
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 |
|
|
statmobile Apprentice
Joined: 16 Jul 2004 Posts: 286 Location: Chapel Hill, NC
|
Posted: Sun Feb 13, 2005 6:21 pm Post subject: |
|
|
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 |
|
|
transient l33t
Joined: 13 Jan 2005 Posts: 759
|
Posted: Sun Feb 13, 2005 8:23 pm Post subject: |
|
|
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 |
|
|
statmobile Apprentice
Joined: 16 Jul 2004 Posts: 286 Location: Chapel Hill, NC
|
Posted: Sun Feb 13, 2005 8:54 pm Post subject: |
|
|
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 |
|
|
transient l33t
Joined: 13 Jan 2005 Posts: 759
|
Posted: Mon Feb 14, 2005 12:39 am Post subject: |
|
|
It should work. |
|
Back to top |
|
|
statmobile Apprentice
Joined: 16 Jul 2004 Posts: 286 Location: Chapel Hill, NC
|
Posted: Mon Feb 14, 2005 2:19 am Post subject: |
|
|
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 |
|
|
transient l33t
Joined: 13 Jan 2005 Posts: 759
|
Posted: Mon Feb 14, 2005 5:05 am Post subject: |
|
|
What does the script have in it?
If its just ordinary commands, you could put it into the local.start directly |
|
Back to top |
|
|
statmobile Apprentice
Joined: 16 Jul 2004 Posts: 286 Location: Chapel Hill, NC
|
Posted: Mon Feb 14, 2005 5:16 am Post subject: |
|
|
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 |
|
|
|