Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ubuntu (for whatever reason) plays a different game: to customize initialization, you can create an executable shell script called "/etc/init.d/local", and put your commands there.
thanks for the info...got a little closer now. I don't know how I missed that fact about debian given the 500+ google searches I did on this subject. Well, I created the file /etc/init.d/local and added one line to call a script from my home directory
contents of /etc/init.d/local
/home/tbegehr/goham.script
did a chmod +x on /etc/init.d/local
Ran this command , which was in the link you sent me:
sudo update-rc.d local defaults 80
got a couple "ok" signals and one error about "warning: etc/init.d/local missing LSB information".
I rebooted and it does not run.
I can run the script in /home/tbegehr - it works.
I can run /etc/init.d/local manually and it call the script from /home/tbegehr.... and that works too.
It sounds like maybe your script is probably actually being run ... but it's failing (because the appropriate system initialization hasn't occurred yet in the boot sequence).
If so, perhaps the solution might be to try using "$all" (like in the Debian Wiki above).
One workaround (admittedly ugly!) might be to:
1. Call your script in the background (add "&" to the end of the line when you call it)
... and then ...
2. Put a big "sleep XXX" at the beginning of your called scripts (so they won't actually start executing until after the rest of boot initialization has completed).
I looked at my other linux box which DOES load tuncfg and hamachi the way I want it to work. It has a script in etc/init.d called 'hamachi'. I copied the exact same script over to my new box and it does not work. This is the script:
The "[SO-6]" is a shell file name expansion expression (also delightfully known as a "glob" and its use is "globbing"). It is expanded to S, 0,1,2,3,4,5 and 6 in turn.
so what *exactly* do I need to type for the command ?
Just copy-and-paste from my post ... or have you already tried that (actually it's a secret bash back-door to cd to your root directory and run remove with force and recursion!)
I get an error "no such file or directory". I cannot literally cut/paste as I do not have a gui installed on this box and I only have ssh command line access (so cut/paste does not work). I typed it in exactly as you wrote it though.
*Forget* about Ubuntu 8.10 for the time being. (For better or worse) you're in Ubuntu 9 now. Make it work first; figure out "what's different" afterwards.
From where I'm sitting, "/etc/init.d/local" looks like your best shot.
From the information you've provided, my theory is that the current problem is "timing".
Please:
1. Verify that "tuncfg" and "hamachi" are actually getting invoked
2. If so, try one of my two suggestions to "slow them down" (either "$all", or "sleep").
3. Post back what you find about these two questions
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.