LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Startup services

[ILUG] Startup services

Kenn Humborg kenn at avalon.wombat.ie
Tue Oct 12 23:18:43 IST 1999


On Tue, Oct 12, 1999 at 07:36:18PM +0100, alan509 wrote:
> I want to add some commands to started everytime my linux machine boots up.
> Im running redhat 6.1.
> 
> I want to add these commands
> 
> ipfwadm -F -p deny
> ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0
> depmod -a
> modprobe ip_masq_ftp
> modprobe ip_masq_raudio
> modprobe ip_masq_irc
> 
> can someone tell me the appropritae file to add these into?
> And where abouts in the file should i enter them into.

The easiest place is at the end of /etc/rc.d/rc.local.

> Also i would like somehow to have a command wvdial
> to run at 6.00pm and to close at 8am weekdays
> and if its possible to get that to run on a friday at 6.00pm and end on a
> monday
> 8.00am

'cron' is the utility for running commands at regularly scheduled times.
'at' is the utility for running one-off jobs at a certain time in the
future.

Normally, cron looks at the system crontab (/etc/crontab) and individual
users' crontabs (in /var/spool/cron) for stuff to do.  Type 'man 5 crontab'
for details on the formats of these files.  The only difference between the
system crontab and the user crontabs is that the system crontab contains 
a field to specify the user under which to run the command.

In addition, the version of cron included with RH6.x has a neat little
feature.  As well as reading /etc/crontab, it will also look into the
directory /etc/cron.d and parse any files in there as if they were 
extensions of the system crontab.  This makes isolating your changes
easier and gives smoother upgrading of the cron package itself.

So what you should do is create a file in /etc/cron.d that looks something
like this:

# Run wvdial to connect each Monday-Friday evening
# (Use 18:05 rather than 18:00 incase our clock is a few
# minutes off UTC)
05 18 * * 1-5 root wvdial connect

# and disconnect each weekday morning
55 7  * * 1-5 root wvdial disconnect

Note that I don't know what the wvdial options are and I doubt
that 'connect' and 'disconnect' will work...

Hope this helps,
Kenn


Take a look at /etc/cron.d.  




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell