Just a sidenote:

On Sat, 15 May 2010 02:33:10 +0200, umage <theultram...@gmail.com> wrote:
> However, if I
> run the script manually, or call it from the end of /etc/rc, it will add
> these rules as well. Currently I am using a workaround.

It's not a good idea to modify /etc/rc. In your case, using the
mechanism s of /etc/rc(.shutdown).local is a good way to call
scripts that do not fit the rc.d concept. See "man rc.local"
for details.

So I would suggest something for /etc/rc.local like this:



#!/bin/sh

if [ -z "${source_rc_confs_defined}" ]; then
        if [ -r /etc/defaults/rc.conf ]; then
                . /etc/defaults/rc.conf
                source_rc_confs
        elif [ -r /etc/rc.conf ]; then
                . /etc/rc.conf
        elif [ -r /etc/rc.conf.local ]; then
                . /etc/rc.conf.local
        fi
fi

echo -n " custom-firewall"
/your/firewall/script.sh --here



The final dot + newline in the messages will be added by rc,
if I remember correctly.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to