LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2007, 06:31 PM   #1
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
Post Startup script in PCLinux


Hey,
I'm using PCLinux TR2 and I want to run a script at start-up (some iptables commands that I need). I've placed the script in init.d but I don't know what to do next.

Thanks
 
Old 02-22-2007, 12:53 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,948

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
If the script isn't to long, you can just copy and paste the commands in the script into /etc/rc.d/rc.local. If the script is long, just put this in rc.local:

cd <path to script directory>
./<script name>

rc.local is the last init script to run and it runs with root privilege like all init scripts. It's generally used to quickly add something to the init sequence and is included in most linux distros but not debian based distros.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PClinux salah-ad-din Linux - Distributions 1 07-08-2006 07:26 PM
pclinux os khaleel5000 Linux - Software 4 01-30-2006 01:37 AM
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 02:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 09:40 PM
wi-fi startup script Nodren Linux - Wireless Networking 6 05-09-2005 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration