Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/rc.d Load rc configuration based on rcvar, not name, so ...
details: https://anonhg.NetBSD.org/src/rev/d735675d5d8e
branches: trunk
changeset: 1026482:d735675d5d8e
user: sborrill <sborrill%NetBSD.org@localhost>
date: Fri Nov 26 13:11:36 2021 +0000
description:
Load rc configuration based on rcvar, not name, so that correct settings
in /etc/rc.conf.d are loaded.
Usually this does not matter as rcvar and name are set to the same value.
For pf_boot and npf_boot, rcvar is set to pf and npf respectively.
Prior to the change, if:
rc.conf contains nfp=YES
rc.conf.d/npf does not exist
Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=YES
If:
rc.conf contains npf=NO (or is not set)
rc.conf.d/npf contains npf=YES
Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=NO
This means that in the latter case, at boot time the npfctl start command
is never run and the firewall is not operational.
diffstat:
etc/rc.d/npf_boot | 4 ++--
etc/rc.d/pf_boot | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 32f24318c796 -r d735675d5d8e etc/rc.d/npf_boot
--- a/etc/rc.d/npf_boot Fri Nov 26 12:51:24 2021 +0000
+++ b/etc/rc.d/npf_boot Fri Nov 26 13:11:36 2021 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: npf_boot,v 1.4 2020/09/08 12:52:18 martin Exp $
+# $NetBSD: npf_boot,v 1.5 2021/11/26 13:11:36 sborrill Exp $
#
# PROVIDE: npf_boot
@@ -29,5 +29,5 @@
/sbin/npfctl start
}
-load_rc_config $name
+load_rc_config $rcvar
run_rc_command "$1"
diff -r 32f24318c796 -r d735675d5d8e etc/rc.d/pf_boot
--- a/etc/rc.d/pf_boot Fri Nov 26 12:51:24 2021 +0000
+++ b/etc/rc.d/pf_boot Fri Nov 26 13:11:36 2021 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pf_boot,v 1.7 2020/09/08 12:52:18 martin Exp $
+# $NetBSD: pf_boot,v 1.8 2021/11/26 13:11:36 sborrill Exp $
#
# PROVIDE: pf_boot
@@ -29,5 +29,5 @@
/sbin/pfctl -q -e
}
-load_rc_config $name
+load_rc_config $rcvar
run_rc_command "$1"
Home |
Main Index |
Thread Index |
Old Index