On Wed, Nov 28, 2001 at 08:47:04PM +0100, Gábor Szemerédy wrote: > When I put rc.firewall file in /etc/rc.d/ directory it is not executed > by system startup and my masquerading of my local addresses is not working!
It doesn't automatically get picked up that way. Files in /etc/rc.d/init.d are master copies of the files in the /etc/rc.d/rc[0-6].d directories--a link is created between the master copy and the directory reflecting the runlevel at which it's supposed to be executed. The name of the link indicates whether that file should be a startup or a shutdown ("S" or "K" prefix), and when it should be executed (numeric sorting of the filenames by the shell.) So, for instance, the master copy of the Samba script is called 'smb' in /etc/rc.d, and is linked to '/etc/rc.d/rc3.d/S91smb' as the startup script for runlevel 3, and '/etc/rc.d/rc3.d/K35smb' as the shutdown script. The '91', when looked at relative to the other numbers assigned in that directory, means Samba gets started pretty late in the runlevel changeover; the '35' in the shutdown means it's one of the earliest services to be stopped. SO, all well and good--you could put your script in /etc/rc.d and either manage it directly by creating/removing links, or using 'chkconfig'. EXCEPT, you have to create the firewall script conforming to the usage of both 'chkconfig' ('man chkconfig') and the run scripting. You could do this by modeling it on another file, and reading the chkconfig man page. For Redhat 6.2, there is already an 'ipchains' runlevel script; you'd have to put your rules in the file '/etc/sysconfig/ipchains' and make 'em meet whatever formatting requirements the script needs. (No, I've not stopped to figure that out.) OR, you could just have your script be one of the last things executed from within the script /etc/rc.d/rc.local. Less elegant, perhaps, but it works fine. Have fun, -- Dave Ihnat [EMAIL PROTECTED] _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list