diff options
author | yar <yar@FreeBSD.org> | 2006-12-31 10:37:18 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2006-12-31 10:37:18 +0000 |
commit | dc9f8423c3772111565181a8568c60c4da0a1689 (patch) | |
tree | 7ed36d4fe8965c59b37bcccfa387cf77469cbeef /etc/rc.d/pf | |
parent | 58a4c67f05bc56e76c61ca19ed42f2e412cfd55f (diff) | |
download | FreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.zip FreeBSD-src-dc9f8423c3772111565181a8568c60c4da0a1689.tar.gz |
Use $required_modules wherever suitable. Use load_kld() in special
cases. So we get rid of quite a few lines of duplicated code.
Diffstat (limited to 'etc/rc.d/pf')
-rw-r--r-- | etc/rc.d/pf | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/etc/rc.d/pf b/etc/rc.d/pf index cf91da3..331fe8e 100644 --- a/etc/rc.d/pf +++ b/etc/rc.d/pf @@ -13,7 +13,6 @@ name="pf" rcvar=`set_rcvar` load_rc_config $name -start_precmd="pf_prestart" start_cmd="pf_start" stop_cmd="pf_stop" check_cmd="pf_check" @@ -22,20 +21,7 @@ resync_cmd="pf_resync" status_cmd="pf_status" extra_commands="check reload resync status" required_files="$pf_rules" - -pf_prestart() -{ - # load pf kernel module if needed - if ! kldstat -q -m pf ; then - if kldload pf ; then - info 'pf module loaded.' - else - warn 'pf module failed to load.' - return 1 - fi - fi - return 0 -} +required_modules="pf" pf_start() { |