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
'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
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
# 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,
Take a look at /etc/cron.d.
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!