Sat Jul 4 06:24:53 2020 UTC ()
Trailing whitespace


(skrll)
diff -r1.15 -r1.16 src/etc/rc.d/bootconf.sh
diff -r1.3 -r1.4 src/etc/rc.d/fccache.in
diff -r1.3 -r1.4 src/etc/rc.d/mdnsd
diff -r1.18 -r1.19 src/etc/rc.d/ipfilter
diff -r1.5 -r1.6 src/etc/rc.d/lvm
diff -r1.25 -r1.26 src/etc/rc.d/named
diff -r1.79 -r1.80 src/etc/rc.d/network
diff -r1.4 -r1.5 src/etc/rc.d/npf
diff -r1.16 -r1.17 src/etc/rc.d/ntpd
diff -r1.11 -r1.12 src/etc/rc.d/pf
diff -r1.10 -r1.11 src/etc/rc.d/rtadvd

cvs diff -r1.15 -r1.16 src/etc/rc.d/bootconf.sh (expand / switch to unified diff)

--- src/etc/rc.d/bootconf.sh 2012/12/31 23:21:27 1.15
+++ src/etc/rc.d/bootconf.sh 2020/07/04 06:24:53 1.16
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: bootconf.sh,v 1.15 2012/12/31 23:21:27 christos Exp $ 3# $NetBSD: bootconf.sh,v 1.16 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: bootconf 6# PROVIDE: bootconf
7# REQUIRE: mountcritlocal 7# REQUIRE: mountcritlocal
8# KEYWORD: interactive 8# KEYWORD: interactive
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name="bootconf" 12name="bootconf"
13start_cmd="bootconf_start" 13start_cmd="bootconf_start"
14stop_cmd=":" 14stop_cmd=":"
15 15
16bootconf_start() 16bootconf_start()
@@ -28,27 +28,27 @@ bootconf_start() @@ -28,27 +28,27 @@ bootconf_start()
28 default=current 28 default=current
29 fi 29 fi
30 if [ "$default" = "current" ]; then 30 if [ "$default" = "current" ]; then
31 def=$(ls -ld /etc/etc.current 2>&1) 31 def=$(ls -ld /etc/etc.current 2>&1)
32 default="${def##*-> *etc.}" 32 default="${def##*-> *etc.}"
33 fi 33 fi
34 34
35 spc="" 35 spc=""
36 for i in /etc/etc.*; do 36 for i in /etc/etc.*; do
37 name="${i##/etc/etc.}" 37 name="${i##/etc/etc.}"
38 case $name in 38 case $name in
39 current|default|\*) 39 current|default|\*)
40 continue 40 continue
41 ;;  41 ;;
42 *) 42 *)
43 if [ "$name" = "$default" ]; then 43 if [ "$name" = "$default" ]; then
44 echo -n "${spc}[${name}]" 44 echo -n "${spc}[${name}]"
45 else 45 else
46 echo -n "${spc}${name}" 46 echo -n "${spc}${name}"
47 fi 47 fi
48 spc=" " 48 spc=" "
49 ;; 49 ;;
50 esac 50 esac
51 done 51 done
52 echo 52 echo
53 _DUMMY=/etc/passwd 53 _DUMMY=/etc/passwd
54 conf=${_DUMMY} 54 conf=${_DUMMY}

cvs diff -r1.3 -r1.4 src/etc/rc.d/fccache.in (expand / switch to unified diff)

--- src/etc/rc.d/fccache.in 2012/02/07 10:36:01 1.3
+++ src/etc/rc.d/fccache.in 2020/07/04 06:24:53 1.4
@@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: fccache.in,v 1.3 2012/02/07 10:36:01 mbalmer Exp $ 3# $NetBSD: fccache.in,v 1.4 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: fccache  6# PROVIDE: fccache
7# REQUIRE: mountcritremote 7# REQUIRE: mountcritremote
8# BEFORE: DAEMON 8# BEFORE: DAEMON
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name="fccache" 12name="fccache"
13rcvar=${name} 13rcvar=${name}
14command="@X11ROOTDIR@/bin/fc-cache" 14command="@X11ROOTDIR@/bin/fc-cache"
15start_cmd="fccache_start" 15start_cmd="fccache_start"
16stop_cmd=":" 16stop_cmd=":"
17 17
18fccache_start() 18fccache_start()
19{ 19{

cvs diff -r1.3 -r1.4 src/etc/rc.d/mdnsd (expand / switch to unified diff)

--- src/etc/rc.d/mdnsd 2015/10/15 16:47:28 1.3
+++ src/etc/rc.d/mdnsd 2020/07/04 06:24:53 1.4
@@ -1,27 +1,27 @@ @@ -1,27 +1,27 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: mdnsd,v 1.3 2015/10/15 16:47:28 roy Exp $ 3# $NetBSD: mdnsd,v 1.4 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: mdnsd 6# PROVIDE: mdnsd
7# REQUIRE: network mountcritlocal staticroute 7# REQUIRE: network mountcritlocal staticroute
8# BEFORE: NETWORKING 8# BEFORE: NETWORKING
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name="mdnsd" 12name="mdnsd"
13rcvar=$name 13rcvar=$name
14command="/usr/sbin/$name" 14command="/usr/sbin/$name"
15pidfile="/var/run/mdnsd/${name}.pid" 15pidfile="/var/run/mdnsd/${name}.pid"
16start_precmd="mdnsd_precmd" 16start_precmd="mdnsd_precmd"
17 17
18mdnsd_precmd() 18mdnsd_precmd()
19{ 19{
20 if [ ! -d /var/run/mdnsd ]; then 20 if [ ! -d /var/run/mdnsd ]; then
21 mkdir -p -m 755 /var/run/mdnsd 21 mkdir -p -m 755 /var/run/mdnsd
22 fi 22 fi
23 chown _mdnsd:_mdnsd /var/run/mdnsd 23 chown _mdnsd:_mdnsd /var/run/mdnsd
24} 24}
25  25
26load_rc_config $name 26load_rc_config $name
27run_rc_command "$1" 27run_rc_command "$1"

cvs diff -r1.18 -r1.19 src/etc/rc.d/ipfilter (expand / switch to unified diff)

--- src/etc/rc.d/ipfilter 2009/03/23 18:52:02 1.18
+++ src/etc/rc.d/ipfilter 2020/07/04 06:24:53 1.19
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: ipfilter,v 1.18 2009/03/23 18:52:02 hannken Exp $ 3# $NetBSD: ipfilter,v 1.19 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: ipfilter 6# PROVIDE: ipfilter
7# REQUIRE: root bootconf mountcritlocal tty 7# REQUIRE: root bootconf mountcritlocal tty
8 8
9$_rc_subr_loaded . /etc/rc.subr 9$_rc_subr_loaded . /etc/rc.subr
10 10
11name="ipfilter" 11name="ipfilter"
12rcvar=$name 12rcvar=$name
13start_precmd="ipfilter_prestart" 13start_precmd="ipfilter_prestart"
14start_cmd="ipfilter_start" 14start_cmd="ipfilter_start"
15stop_precmd="test -f /etc/ipf.conf -o -f /etc/ipf6.conf" 15stop_precmd="test -f /etc/ipf.conf -o -f /etc/ipf6.conf"
16stop_cmd="ipfilter_stop" 16stop_cmd="ipfilter_stop"
@@ -74,27 +74,27 @@ ipfilter_reload() @@ -74,27 +74,27 @@ ipfilter_reload()
74 fi 74 fi
75 if [ -f /etc/ipf6.conf ]; then 75 if [ -f /etc/ipf6.conf ]; then
76 /sbin/ipf -6 -I -Fa 76 /sbin/ipf -6 -I -Fa
77 fi 77 fi
78 78
79 # Now load the config files into the Inactive set 79 # Now load the config files into the Inactive set
80 # 80 #
81 if [ -f /etc/ipf.conf ] && ! /sbin/ipf -I -f /etc/ipf.conf; then 81 if [ -f /etc/ipf.conf ] && ! /sbin/ipf -I -f /etc/ipf.conf; then
82 err 1 "reload of ipf.conf failed; not swapping to new ruleset." 82 err 1 "reload of ipf.conf failed; not swapping to new ruleset."
83 fi 83 fi
84 if [ -f /etc/ipf6.conf ] && ! /sbin/ipf -I -6 -f /etc/ipf6.conf; then 84 if [ -f /etc/ipf6.conf ] && ! /sbin/ipf -I -6 -f /etc/ipf6.conf; then
85 err 1 "reload of ipf6.conf failed; not swapping to new ruleset." 85 err 1 "reload of ipf6.conf failed; not swapping to new ruleset."
86 fi 86 fi
87  87
88 # Swap in the new rules 88 # Swap in the new rules
89 # 89 #
90 /sbin/ipf -s 90 /sbin/ipf -s
91} 91}
92 92
93ipfilter_resync() 93ipfilter_resync()
94{ 94{
95 /sbin/ipf -y 95 /sbin/ipf -y
96} 96}
97 97
98ipfilter_status() 98ipfilter_status()
99{ 99{
100 /sbin/ipf -V 100 /sbin/ipf -V

cvs diff -r1.5 -r1.6 src/etc/rc.d/lvm (expand / switch to unified diff)

--- src/etc/rc.d/lvm 2009/04/21 16:08:57 1.5
+++ src/etc/rc.d/lvm 2020/07/04 06:24:53 1.6
@@ -1,90 +1,90 @@ @@ -1,90 +1,90 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: lvm,v 1.5 2009/04/21 16:08:57 joerg Exp $ 3# $NetBSD: lvm,v 1.6 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: lvm 6# PROVIDE: lvm
7# REQUIRE: root 7# REQUIRE: root
8# BEFORE: DISKS 8# BEFORE: DISKS
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name="lvm" 12name="lvm"
13rcvar=$name 13rcvar=$name
14start_cmd="lvm_start" 14start_cmd="lvm_start"
15stop_cmd="lvm_stop" 15stop_cmd="lvm_stop"
16 16
17ifs_restore="$IFS"; 17ifs_restore="$IFS";
18 18
19lvm_start() 19lvm_start()
20{ 20{
21 if [ -x /sbin/dmsetup ]; then 21 if [ -x /sbin/dmsetup ]; then
22 /sbin/dmsetup version >/dev/null 22 /sbin/dmsetup version >/dev/null
23 if [ $? -ne 0 ]; then  23 if [ $? -ne 0 ]; then
24 warn "Device-mapper not present in kernel" 24 warn "Device-mapper not present in kernel"
25 return 1; 25 return 1;
26 fi 26 fi
27 fi 27 fi
28 28
29 if [ -x /sbin/lvm ]; then 29 if [ -x /sbin/lvm ]; then
30 echo "Configuring lvm devices." 30 echo "Configuring lvm devices."
31 31
32 # Scan for all available VG's 32 # Scan for all available VG's
33 /sbin/lvm vgscan --mknodes --ignorelockingfailure >/dev/null 33 /sbin/lvm vgscan --mknodes --ignorelockingfailure >/dev/null
34  34
35 # Activate all LV's and create apropriate nodes in /dev 35 # Activate all LV's and create apropriate nodes in /dev
36 /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null 36 /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
37 LV_LIST=$(/sbin/lvm vgdisplay -C -o vg_name --noheadings 2>/dev/null) 37 LV_LIST=$(/sbin/lvm vgdisplay -C -o vg_name --noheadings 2>/dev/null)
38 echo " Activated Volume Groups:" $LV_LIST 38 echo " Activated Volume Groups:" $LV_LIST
39 fi 39 fi
40} 40}
41 41
42lvm_stop() 42lvm_stop()
43{ 43{
44 if [ -x /sbin/dmsetup ]; then 44 if [ -x /sbin/dmsetup ]; then
45 /sbin/dmsetup version >/dev/null 45 /sbin/dmsetup version >/dev/null
46 if [ $? -ne 0 ]; then  46 if [ $? -ne 0 ]; then
47 warn "Device-mapper not present in kernel" 47 warn "Device-mapper not present in kernel"
48 return 1; 48 return 1;
49 fi 49 fi
50 fi 50 fi
51 51
52 if [ -x /sbin/lvm ]; then 52 if [ -x /sbin/lvm ]; then
53 echo "Unconfiguring lvm devices." 53 echo "Unconfiguring lvm devices."
54  54
55 LOGICAL_VOLUMES=$(/sbin/lvm lvdisplay -C -o vg_name,lv_name \ 55 LOGICAL_VOLUMES=$(/sbin/lvm lvdisplay -C -o vg_name,lv_name \
56 -O vg_name --separator \/ --noheadings 2>/dev/null) 56 -O vg_name --separator \/ --noheadings 2>/dev/null)
57 VOLUME_GROUPS=$(/sbin/lvm vgdisplay -C -o vg_name \ 57 VOLUME_GROUPS=$(/sbin/lvm vgdisplay -C -o vg_name \
58 --separator " " --noheadings 2>/dev/null) 58 --separator " " --noheadings 2>/dev/null)
59 59
60 for lv in ${LOGICAL_VOLUMES}; do 60 for lv in ${LOGICAL_VOLUMES}; do
61 LV_IS_ACTIVE=$(/sbin/lvm lvdisplay -C --noheadings \ 61 LV_IS_ACTIVE=$(/sbin/lvm lvdisplay -C --noheadings \
62 -o lv_attr $lv) 62 -o lv_attr $lv)
63 case $LV_IS_ACTIVE in 63 case $LV_IS_ACTIVE in
64 *a*) 64 *a*)
65 echo " Shutting Down logical volume: ${lv}" 65 echo " Shutting Down logical volume: ${lv}"
66 /sbin/lvm lvchange -an --ignorelockingfailure \ 66 /sbin/lvm lvchange -an --ignorelockingfailure \
67 -P ${lv} >/dev/null 67 -P ${lv} >/dev/null
68 ;; 68 ;;
69 esac 69 esac
70 done 70 done
71  71
72 for vg in ${VOLUME_GROUPS}; do 72 for vg in ${VOLUME_GROUPS}; do
73 # Set IFS to field separator 73 # Set IFS to field separator
74 IFS=":" 74 IFS=":"
75 set -- $(/sbin/lvm vgdisplay -cA ${vg} 2>/dev/null) 75 set -- $(/sbin/lvm vgdisplay -cA ${vg} 2>/dev/null)
76 # The seventh parameter is number of opened LVs in a Volume Group 76 # The seventh parameter is number of opened LVs in a Volume Group
77 VG_HAS_ACTIVE_LV=$7 77 VG_HAS_ACTIVE_LV=$7
78 IFS="$ifs_restore"; 78 IFS="$ifs_restore";
79  79
80 if [ "${VG_HAS_ACTIVE_LV}" = 0 ]; then 80 if [ "${VG_HAS_ACTIVE_LV}" = 0 ]; then
81 echo " Shutting Down volume group: ${vg}" 81 echo " Shutting Down volume group: ${vg}"
82 /sbin/lvm vgchange -an --ignorelockingfailure \ 82 /sbin/lvm vgchange -an --ignorelockingfailure \
83 -P ${vg} >/dev/null 83 -P ${vg} >/dev/null
84 fi 84 fi
85 done 85 done
86 fi 86 fi
87} 87}
88 88
89load_rc_config $name 89load_rc_config $name
90run_rc_command "$1" 90run_rc_command "$1"

cvs diff -r1.25 -r1.26 src/etc/rc.d/named (expand / switch to unified diff)

--- src/etc/rc.d/named 2014/07/13 22:06:56 1.25
+++ src/etc/rc.d/named 2020/07/04 06:24:53 1.26
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: named,v 1.25 2014/07/13 22:06:56 tls Exp $ 3# $NetBSD: named,v 1.26 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: named 6# PROVIDE: named
7# REQUIRE: NETWORKING mountcritremote syslogd 7# REQUIRE: NETWORKING mountcritremote syslogd
8# BEFORE: DAEMON 8# BEFORE: DAEMON
9# KEYWORD: chrootdir 9# KEYWORD: chrootdir
10 10
11$_rc_subr_loaded . /etc/rc.subr 11$_rc_subr_loaded . /etc/rc.subr
12 12
13name="named" 13name="named"
14rcvar=$name 14rcvar=$name
15command="/usr/sbin/${name}" 15command="/usr/sbin/${name}"
16pidfile="/var/run/${name}/${name}.pid" 16pidfile="/var/run/${name}/${name}.pid"
@@ -67,54 +67,54 @@ named_precmd() @@ -67,54 +67,54 @@ named_precmd()
67 echo "Generating rndc.key" 67 echo "Generating rndc.key"
68 /usr/sbin/rndc-confgen -a 68 /usr/sbin/rndc-confgen -a
69 fi 69 fi
70 70
71 if [ -z "$named_chrootdir" ]; then 71 if [ -z "$named_chrootdir" ]; then
72 if [ ! -d "/etc/namedb/keys" ]; then 72 if [ ! -d "/etc/namedb/keys" ]; then
73 mkdir -m 775 "/etc/namedb/keys" 73 mkdir -m 775 "/etc/namedb/keys"
74 chown named:named "/etc/namedb/keys" 74 chown named:named "/etc/namedb/keys"
75 fi 75 fi
76 return 0; 76 return 0;
77 fi 77 fi
78 78
79 # If running in a chroot cage, ensure that the appropriate files 79 # If running in a chroot cage, ensure that the appropriate files
80 # exist inside the cage, as well as helper symlinks into the cage  80 # exist inside the cage, as well as helper symlinks into the cage
81 # from outside. 81 # from outside.
82 # 82 #
83 # As this is called after the is_running and required_dir checks 83 # As this is called after the is_running and required_dir checks
84 # are made in run_rc_command(), we can safely assume ${named_chrootdir} 84 # are made in run_rc_command(), we can safely assume ${named_chrootdir}
85 # exists and named isn't running at this point (unless forcestart 85 # exists and named isn't running at this point (unless forcestart
86 # is used). 86 # is used).
87 # 87 #
88 case "$($command -v)" in 88 case "$($command -v)" in
89 BIND*) # 9 no group, named-xfer, or ndc 89 BIND*) # 9 no group, named-xfer, or ndc
90 ;; 90 ;;
91 named*) # 4 and 8 91 named*) # 4 and 8
92 rc_flags="-g named $rc_flags" 92 rc_flags="-g named $rc_flags"
93 if [ ! -x "${named_chrootdir}/usr/libexec/named-xfer" -o \ 93 if [ ! -x "${named_chrootdir}/usr/libexec/named-xfer" -o \
94 "${named_chrootdir}/usr/libexec/named-xfer" -ot \ 94 "${named_chrootdir}/usr/libexec/named-xfer" -ot \
95 /usr/libexec/named-xfer ]; then 95 /usr/libexec/named-xfer ]; then
96 rm -f "${named_chrootdir}/usr/libexec/named-xfer" 96 rm -f "${named_chrootdir}/usr/libexec/named-xfer"
97 cp -p /usr/libexec/named-xfer \ 97 cp -p /usr/libexec/named-xfer \
98 "${named_chrootdir}/usr/libexec" 98 "${named_chrootdir}/usr/libexec"
99 fi 99 fi
100 ln -fs "${named_chrootdir}/var/run/ndc" /var/run/ndc 100 ln -fs "${named_chrootdir}/var/run/ndc" /var/run/ndc
101 ;; 101 ;;
102 esac 102 esac
103 103
104 for i in null random urandom; do 104 for i in null random urandom; do
105 if [ ! -c "${named_chrootdir}/dev/$i" ]; then 105 if [ ! -c "${named_chrootdir}/dev/$i" ]; then
106 rm -f "${named_chrootdir}/dev/$i" 106 rm -f "${named_chrootdir}/dev/$i"
107 (cd /dev &&  107 (cd /dev &&
108 /bin/pax -rw -pe "$i" "${named_chrootdir}/dev") 108 /bin/pax -rw -pe "$i" "${named_chrootdir}/dev")
109 fi 109 fi
110 done 110 done
111 111
112 if [ ! -h /etc/namedb ]; then 112 if [ ! -h /etc/namedb ]; then
113 named_migrate /etc/namedb ${named_chrootdir} 113 named_migrate /etc/namedb ${named_chrootdir}
114 fi 114 fi
115 115
116 for i in named.conf rndc.key; do 116 for i in named.conf rndc.key; do
117 if [ \( -r "/etc/$i" \) -a \( ! -h "/etc/$i" \) -a \ 117 if [ \( -r "/etc/$i" \) -a \( ! -h "/etc/$i" \) -a \
118 \( ! -r "${named_chrootdir}/etc/$i" \) ]; then 118 \( ! -r "${named_chrootdir}/etc/$i" \) ]; then
119 mv "/etc/$i" "${named_chrootdir}/etc/$i" 119 mv "/etc/$i" "${named_chrootdir}/etc/$i"
120 ln -s "${named_chrootdir}/etc/$i" "/etc/$i" 120 ln -s "${named_chrootdir}/etc/$i" "/etc/$i"

cvs diff -r1.79 -r1.80 src/etc/rc.d/network (expand / switch to unified diff)

--- src/etc/rc.d/network 2020/06/12 11:04:45 1.79
+++ src/etc/rc.d/network 2020/07/04 06:24:53 1.80
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: network,v 1.79 2020/06/12 11:04:45 roy Exp $ 3# $NetBSD: network,v 1.80 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: network 6# PROVIDE: network
7# REQUIRE: ipfilter ipsec mountcritlocal root tty sysctl 7# REQUIRE: ipfilter ipsec mountcritlocal root tty sysctl
8# BEFORE: NETWORKING 8# BEFORE: NETWORKING
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name="network" 12name="network"
13start_cmd="network_start" 13start_cmd="network_start"
14stop_cmd="network_stop" 14stop_cmd="network_stop"
15 15
16nl=' 16nl='
@@ -181,27 +181,27 @@ network_start_ipv6_route() @@ -181,27 +181,27 @@ network_start_ipv6_route()
181 if ! checkyesno ip6uniquelocal; then 181 if ! checkyesno ip6uniquelocal; then
182 /sbin/route -q add -inet6 fc00:: -prefixlen 7 \ 182 /sbin/route -q add -inet6 fc00:: -prefixlen 7 \
183 ::1 -reject 183 ::1 -reject
184 fi 184 fi
185 ;; 185 ;;
186 186
187 autohost) 187 autohost)
188 if ! checkyesno dhcpcd; then 188 if ! checkyesno dhcpcd; then
189 warn "rtsol and kernel ra handling have been removed" 189 warn "rtsol and kernel ra handling have been removed"
190 warn "please configure dhcpcd in its place." 190 warn "please configure dhcpcd in its place."
191 fi 191 fi
192 ;; 192 ;;
193 193
194 host)  194 host)
195 echo 'IPv6 mode: host' 195 echo 'IPv6 mode: host'
196 ;; 196 ;;
197 197
198 *) warn "invalid \$ip6mode value "\"$ip6mode\" 198 *) warn "invalid \$ip6mode value "\"$ip6mode\"
199 ;; 199 ;;
200 200
201 esac 201 esac
202} 202}
203 203
204network_start_interfaces() 204network_start_interfaces()
205{ 205{
206 # Configure all of the network interfaces listed in $net_interfaces; 206 # Configure all of the network interfaces listed in $net_interfaces;
207 # if $auto_ifconfig is YES, grab all interfaces from ifconfig. 207 # if $auto_ifconfig is YES, grab all interfaces from ifconfig.

cvs diff -r1.4 -r1.5 src/etc/rc.d/npf (expand / switch to unified diff)

--- src/etc/rc.d/npf 2019/04/19 18:36:25 1.4
+++ src/etc/rc.d/npf 2020/07/04 06:24:53 1.5
@@ -1,43 +1,43 @@ @@ -1,43 +1,43 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: npf,v 1.4 2019/04/19 18:36:25 leot Exp $ 3# $NetBSD: npf,v 1.5 2020/07/04 06:24:53 skrll Exp $
4# 4#
5# Public Domain. 5# Public Domain.
6# 6#
7 7
8# PROVIDE: npf 8# PROVIDE: npf
9# REQUIRE: root bootconf mountcritlocal tty network 9# REQUIRE: root bootconf mountcritlocal tty network
10# BEFORE: NETWORKING 10# BEFORE: NETWORKING
11 11
12$_rc_subr_loaded . /etc/rc.subr 12$_rc_subr_loaded . /etc/rc.subr
13 13
14name="npf" 14name="npf"
15rcvar=$name 15rcvar=$name
16 16
17config="/etc/npf.conf" 17config="/etc/npf.conf"
18 18
19start_cmd="npf_start" 19start_cmd="npf_start"
20stop_cmd="npf_stop" 20stop_cmd="npf_stop"
21 21
22reload_cmd="npf_reload" 22reload_cmd="npf_reload"
23status_cmd="npf_status" 23status_cmd="npf_status"
24extra_commands="reload status" 24extra_commands="reload status"
25 25
26npf_cfg_check() 26npf_cfg_check()
27{ 27{
28 if [ ! -f ${config} ]; then 28 if [ ! -f ${config} ]; then
29 warn "${config} is not readable; failed." 29 warn "${config} is not readable; failed."
30 exit 1  30 exit 1
31 fi 31 fi
32} 32}
33 33
34npf_start() 34npf_start()
35{ 35{
36 echo "Enabling NPF." 36 echo "Enabling NPF."
37 npf_cfg_check 37 npf_cfg_check
38 /sbin/npfctl reload 38 /sbin/npfctl reload
39 39
40 # The npf_boot script has enabled npf already. 40 # The npf_boot script has enabled npf already.
41 if [ "$autoboot" != "yes" ]; then 41 if [ "$autoboot" != "yes" ]; then
42 /sbin/npfctl start 42 /sbin/npfctl start
43 fi 43 fi

cvs diff -r1.16 -r1.17 src/etc/rc.d/ntpd (expand / switch to unified diff)

--- src/etc/rc.d/ntpd 2015/11/23 19:56:47 1.16
+++ src/etc/rc.d/ntpd 2020/07/04 06:24:53 1.17
@@ -1,41 +1,41 @@ @@ -1,41 +1,41 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: ntpd,v 1.16 2015/11/23 19:56:47 christos Exp $ 3# $NetBSD: ntpd,v 1.17 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: ntpd 6# PROVIDE: ntpd
7# REQUIRE: DAEMON 7# REQUIRE: DAEMON
8# BEFORE: LOGIN 8# BEFORE: LOGIN
9# KEYWORD: chrootdir 9# KEYWORD: chrootdir
10 10
11$_rc_subr_loaded . /etc/rc.subr 11$_rc_subr_loaded . /etc/rc.subr
12 12
13name="ntpd" 13name="ntpd"
14rcvar=$name 14rcvar=$name
15command="/usr/sbin/${name}" 15command="/usr/sbin/${name}"
16pidfile="/var/run/${name}.pid" 16pidfile="/var/run/${name}.pid"
17start_precmd="ntpd_precmd" 17start_precmd="ntpd_precmd"
18required_files="/etc/ntp.conf" 18required_files="/etc/ntp.conf"
19 19
20ntpd_precmd() 20ntpd_precmd()
21{ 21{
22 rc_flags="-p ${pidfile} $rc_flags" 22 rc_flags="-p ${pidfile} $rc_flags"
23 if [ -z "$ntpd_chrootdir" ]; then 23 if [ -z "$ntpd_chrootdir" ]; then
24 return 0; 24 return 0;
25 fi 25 fi
26 26
27 # If running in a chroot cage, ensure that the appropriate files 27 # If running in a chroot cage, ensure that the appropriate files
28 # exist inside the cage, as well as helper symlinks into the cage  28 # exist inside the cage, as well as helper symlinks into the cage
29 # from outside. 29 # from outside.
30 # 30 #
31 # As this is called after the is_running and required_dir checks 31 # As this is called after the is_running and required_dir checks
32 # are made in run_rc_command(), we can safely assume ${ntpd_chrootdir} 32 # are made in run_rc_command(), we can safely assume ${ntpd_chrootdir}
33 # exists and ntpd isn't running at this point (unless forcestart 33 # exists and ntpd isn't running at this point (unless forcestart
34 # is used). 34 # is used).
35 # 35 #
36 # Before enabling ntpd_chrootdir, ensure that: 36 # Before enabling ntpd_chrootdir, ensure that:
37 # - The kernel has "pseudo-device clockctl" compiled in 37 # - The kernel has "pseudo-device clockctl" compiled in
38 # - /dev/clockctl is present 38 # - /dev/clockctl is present
39 # 39 #
40 if (: </dev/clockctl) 2>/dev/null; then 40 if (: </dev/clockctl) 2>/dev/null; then
41 : exists and works 41 : exists and works

cvs diff -r1.11 -r1.12 src/etc/rc.d/pf (expand / switch to unified diff)

--- src/etc/rc.d/pf 2018/06/29 12:34:15 1.11
+++ src/etc/rc.d/pf 2020/07/04 06:24:53 1.12
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: pf,v 1.11 2018/06/29 12:34:15 roy Exp $ 3# $NetBSD: pf,v 1.12 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: pf 6# PROVIDE: pf
7# REQUIRE: root bootconf mountcritlocal tty network dhcpcd 7# REQUIRE: root bootconf mountcritlocal tty network dhcpcd
8# BEFORE: NETWORKING 8# BEFORE: NETWORKING
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name="pf" 12name="pf"
13rcvar=$name 13rcvar=$name
14start_precmd="pf_prestart" 14start_precmd="pf_prestart"
15start_cmd="pf_start" 15start_cmd="pf_start"
16stop_cmd="pf_stop" 16stop_cmd="pf_stop"
@@ -25,27 +25,27 @@ pf_prestart() @@ -25,27 +25,27 @@ pf_prestart()
25 25
26 stop_boot 26 stop_boot
27 return 1 27 return 1
28 fi 28 fi
29 return 0 29 return 0
30} 30}
31 31
32pf_start() 32pf_start()
33{ 33{
34 echo "Enabling pf firewall." 34 echo "Enabling pf firewall."
35 35
36 # The pf_boot script has enabled pf already. 36 # The pf_boot script has enabled pf already.
37 if [ "$autoboot" != yes ]; then 37 if [ "$autoboot" != yes ]; then
38 /sbin/pfctl -q ${pf_flags} -e  38 /sbin/pfctl -q ${pf_flags} -e
39 fi 39 fi
40 40
41 if [ -f ${pf_rules} ]; then 41 if [ -f ${pf_rules} ]; then
42 /sbin/pfctl -q ${pf_flags} -f ${pf_rules} 42 /sbin/pfctl -q ${pf_flags} -f ${pf_rules}
43 else 43 else
44 warn "${pf_rules} not found; no pf rules loaded." 44 warn "${pf_rules} not found; no pf rules loaded."
45 fi 45 fi
46} 46}
47 47
48pf_stop() 48pf_stop()
49{ 49{
50 echo "Disabling pf firewall." 50 echo "Disabling pf firewall."
51 /sbin/pfctl -q ${pf_flags} -Fa -d 51 /sbin/pfctl -q ${pf_flags} -Fa -d

cvs diff -r1.10 -r1.11 src/etc/rc.d/rtadvd (expand / switch to unified diff)

--- src/etc/rc.d/rtadvd 2016/11/19 01:14:58 1.10
+++ src/etc/rc.d/rtadvd 2020/07/04 06:24:53 1.11
@@ -1,38 +1,38 @@ @@ -1,38 +1,38 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: rtadvd,v 1.10 2016/11/19 01:14:58 kre Exp $ 3# $NetBSD: rtadvd,v 1.11 2020/07/04 06:24:53 skrll Exp $
4# 4#
5 5
6# PROVIDE: rtadvd 6# PROVIDE: rtadvd
7# REQUIRE: DAEMON 7# REQUIRE: DAEMON
8# BEFORE: LOGIN 8# BEFORE: LOGIN
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name=rtadvd 12name=rtadvd
13rcvar=$name 13rcvar=$name
14command="/usr/sbin/$name" 14command="/usr/sbin/$name"
15pidfile="/var/run/$name.pid" 15pidfile="/var/run/$name.pid"
16extra_commands=reload 16extra_commands=reload
17start_precmd=rtadvd_prestart 17start_precmd=rtadvd_prestart
18reload_precmd=rtadvd_prereload 18reload_precmd=rtadvd_prereload
19 19
20rtadvd_prereload() 20rtadvd_prereload()
21{ 21{
22 local chdir="$(getent passwd _rtadvd | cut -d: -f6)" 22 local chdir="$(getent passwd _rtadvd | cut -d: -f6)"
23 local conf=/etc/rtadvd.conf myflags o confdir 23 local conf=/etc/rtadvd.conf myflags o confdir
24 local cflag=false 24 local cflag=false
25  25
26 [ -z "${chdir}" ] || [ "/${chdir}" = // ] && return 0 26 [ -z "${chdir}" ] || [ "/${chdir}" = // ] && return 0
27 27
28 if [ -n "${flags}" ]; then 28 if [ -n "${flags}" ]; then
29 myflags=${flags} 29 myflags=${flags}
30 else 30 else
31 eval myflags=\$${name}_flags 31 eval myflags=\$${name}_flags
32 fi 32 fi
33 set -- ${myflags} 33 set -- ${myflags}
34 while getopts c:dDfM:Rs o; do 34 while getopts c:dDfM:Rs o; do
35 # ignore other args, they are processed by rtadvd itself 35 # ignore other args, they are processed by rtadvd itself
36 case "${o}" in 36 case "${o}" in
37 c) conf="${OPTARG}" 37 c) conf="${OPTARG}"
38 case "${conf}" in 38 case "${conf}" in