Click to See Complete Forum and Search --> : DEBIAN rc.local problem
cookiemonster
03-03-2001, 12:55 AM
I followed the NHF to get a rc.local. The problem is that when I try to edit it as root it wont let me. The icon is of a piston and not a sheet of paper. What did I do wrong and what do I do to correct it??
Dan :confused:
Dwergje
03-03-2001, 03:44 AM
Hello,
In debian there is no rc.local. I put my startup scripts in /etc/init.d/
You should (of course) start your scripts with #!/bin/sh. After that comes the "real" script.
When finished writing your script, do this:
$ update-rc.d <scriptname> default
I wrote a simple ipchains script myself. I called my script if-up.d. The script looked like this:
#!/bin/sh
ipchains -F
ipchains -P forward DENY
ipchains -A forward -j MASQ -s 10.0.0.1
ipchains -A forward -j MASQ -s 10.0.0.2
Finished writing the script.
$ update-rc.d if-up.d default
Be sure to chmod your script...
cookiemonster
03-03-2001, 10:01 AM
Please remember I am a real newbie so if you could do this step by step it would be of great help.
What I wanted to do was, do the hard drive tweeks and the setserial for the modem.
Right now for some wierd reason I can open a terminal window and connect to the net using pon but cant do it with anything else. NO CLUE as to why that is. I checked the setup of the other dialers and they are correct. :confused:
I did an apt-get of kde. when I tried to run it the desk top froze and looked wierd, what do I need to do to get it to run correctly?
[ 03 March 2001: Message edited by: cookiemonster ]
Dwergje
03-03-2001, 01:47 PM
I am not sure if this will work, but I think so:
1 Create a file in your /etc/init.d/ dir and call it hddtweak-rc.d or something.
2 Put this in the file:
#!/bin/sh
<what your normally typ on the command line to execute hdd tweaks>
3 update-rc.d hddtweak-rc.d default
4 chmod u+rwx hddtweak-rc.d
chmod g+rw hddtweak-rc.d
chmod a+r hddtweak-rc.d
reboot and see if this works, I am not sure if the permissions (chmod) are OK now, if not, tell me and IŽll come back later :)
To do the modem tweaks, follow the same steps, only give it another name, modem-rc.d for example. Be sure to start the script with #!/bin/sh.
Good luck!