CVS commit: [netbsd-9] src/etc/rc.d

2021-03-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Mar  9 16:01:24 UTC 2021

Modified Files:
src/etc/rc.d [netbsd-9]: mountall

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1230):

etc/rc.d/mountall: revision 1.15

Need to explicitly load value of zfs variable as zfs=YES may be set in
/etc/rc.conf.d/zfs, not /etc/rc.conf.


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.2 -r1.10.4.3 src/etc/rc.d/mountall

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/mountall
diff -u src/etc/rc.d/mountall:1.10.4.2 src/etc/rc.d/mountall:1.10.4.3
--- src/etc/rc.d/mountall:1.10.4.2	Tue Feb 25 20:03:12 2020
+++ src/etc/rc.d/mountall	Tue Mar  9 16:01:24 2021
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mountall,v 1.10.4.2 2020/02/25 20:03:12 martin Exp $
+# $NetBSD: mountall,v 1.10.4.3 2021/03/09 16:01:24 martin Exp $
 #
 
 # REQUIRE: mountcritremote named ypbind
@@ -35,4 +35,5 @@ mountall_stop()
 }
 
 load_rc_config $name
+load_rc_config_var zfs zfs
 run_rc_command "$1"



CVS commit: [netbsd-9] src/etc/rc.d

2020-12-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Dec 28 16:00:19 UTC 2020

Modified Files:
src/etc/rc.d [netbsd-9]: ntpdate

Log Message:
Pull up following revision(s) (requested by martin in ticket #1164):

etc/rc.d/ntpdate: revision 1.21

Adjust to "pool" usage in our standard ntp.conf, pointed out
by Connor McLaughlan.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.50.1 src/etc/rc.d/ntpdate

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/ntpdate
diff -u src/etc/rc.d/ntpdate:1.20 src/etc/rc.d/ntpdate:1.20.50.1
--- src/etc/rc.d/ntpdate:1.20	Mon Aug  3 18:43:48 2009
+++ src/etc/rc.d/ntpdate	Mon Dec 28 16:00:19 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ntpdate,v 1.20 2009/08/03 18:43:48 perry Exp $
+# $NetBSD: ntpdate,v 1.20.50.1 2020/12/28 16:00:19 snj Exp $
 #
 
 # PROVIDE: ntpdate
@@ -21,7 +21,7 @@ ntpdate_start()
 		ntpdate_hosts=$(awk '
 			/^#/{ next }
 			/^(server|peer)[ \t]*127.127/	{ next }
-			/^(server|peer)/		{ if ($2 ~ /^-[46]/)
+			/^(server|peer|pool)/		{ if ($2 ~ /^-[46]/)
 			print $3
 			  else
 			print $2 }



CVS commit: [netbsd-9] src/etc/rc.d

2020-06-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun 20 16:41:57 UTC 2020

Modified Files:
src/etc/rc.d [netbsd-9]: postfix

Log Message:
Pull up following revision(s) (requested by rin in ticket #966):

etc/rc.d/postfix: revision 1.19

little bit verbose for slow machines


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.16.1 src/etc/rc.d/postfix

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/postfix
diff -u src/etc/rc.d/postfix:1.18 src/etc/rc.d/postfix:1.18.16.1
--- src/etc/rc.d/postfix:1.18	Sun Oct 30 15:47:06 2016
+++ src/etc/rc.d/postfix	Sat Jun 20 16:41:57 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postfix,v 1.18 2016/10/30 15:47:06 riastradh Exp $
+# $NetBSD: postfix,v 1.18.16.1 2020/06/20 16:41:57 martin Exp $
 #
 
 # PROVIDE: mail
@@ -64,6 +64,8 @@ postfix_precmd()
 			;;
 		esac
 	done
+
+	echo "Starting ${name}."
 }
 
 postfix_op()



CVS commit: [netbsd-9] src/etc/rc.d

2020-05-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  2 16:24:11 UTC 2020

Modified Files:
src/etc/rc.d [netbsd-9]: random_seed

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #882):

etc/rc.d/random_seed: revision 1.9

Don't delete the random seed before issuing `rndctl -S'.
`rndctl -S' can replace the file just fine, and deleting it ahead of
time adds a window during which we can lose the seed altogether if
the system is interrupted by a crash or power outage.

XXX pullup


To generate a diff of this commit:
cvs rdiff -u -r1.7.26.1 -r1.7.26.2 src/etc/rc.d/random_seed

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/random_seed
diff -u src/etc/rc.d/random_seed:1.7.26.1 src/etc/rc.d/random_seed:1.7.26.2
--- src/etc/rc.d/random_seed:1.7.26.1	Sun Mar  1 11:53:09 2020
+++ src/etc/rc.d/random_seed	Sat May  2 16:24:11 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: random_seed,v 1.7.26.1 2020/03/01 11:53:09 martin Exp $
+# $NetBSD: random_seed,v 1.7.26.2 2020/05/02 16:24:11 martin Exp $
 #
 
 # PROVIDE: random_seed
@@ -93,8 +93,6 @@ random_save()
 	oum="$(umask)"
 	umask 077
 
-	rm -Pf "${random_file}"
-
 	if ! fs_safe "$(dirname "${random_file}")"; then
 		umask "${oum}"
 		return 1



CVS commit: [netbsd-9] src/etc/rc.d

2020-03-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Mar  1 11:53:09 UTC 2020

Modified Files:
src/etc/rc.d [netbsd-9]: random_seed

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #743):

etc/rc.d/random_seed: revision 1.8

Allow random seed on zfs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.26.1 src/etc/rc.d/random_seed

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/random_seed
diff -u src/etc/rc.d/random_seed:1.7 src/etc/rc.d/random_seed:1.7.26.1
--- src/etc/rc.d/random_seed:1.7	Tue Jul 22 17:11:09 2014
+++ src/etc/rc.d/random_seed	Sun Mar  1 11:53:09 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: random_seed,v 1.7 2014/07/22 17:11:09 wiz Exp $
+# $NetBSD: random_seed,v 1.7.26.1 2020/03/01 11:53:09 martin Exp $
 #
 
 # PROVIDE: random_seed
@@ -47,7 +47,7 @@ fs_safe()
 	#
 	fstype="$(getfstype "$1")"
 	case "${fstype}" in
-	ffs|lfs|ext2fs|msdos|v7fs)
+	ffs|lfs|ext2fs|msdos|v7fs|zfs)
 		return 0
 		;;
 	*)



CVS commit: [netbsd-9] src/etc/rc.d

2020-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 31 11:21:42 UTC 2020

Modified Files:
src/etc/rc.d [netbsd-9]: ipsec

Log Message:
Pull up following revision(s) (requested by kim in ticket #676):

etc/rc.d/ipsec: revision 1.16

Skip inet6 addresses that begin with fe80: (not just exact match).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.2.1 src/etc/rc.d/ipsec

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/ipsec
diff -u src/etc/rc.d/ipsec:1.15 src/etc/rc.d/ipsec:1.15.2.1
--- src/etc/rc.d/ipsec:1.15	Mon Aug 13 09:16:06 2018
+++ src/etc/rc.d/ipsec	Fri Jan 31 11:21:42 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ipsec,v 1.15 2018/08/13 09:16:06 christos Exp $
+# $NetBSD: ipsec,v 1.15.2.1 2020/01/31 11:21:42 martin Exp $
 #
 
 # PROVIDE: ipsec
@@ -34,7 +34,7 @@ ipsec_getip() {
 		case "$what" in
 		inet)	echo "local v4_addr=$address;";;
 		inet6)	case "$address" in
-			fe80:)	;;
+			fe80:*)	;;
 			*)	echo "local v6_addr=$address;";;
 			esac;;
 		esac



CVS commit: [netbsd-9] src/etc/rc.d

2020-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 31 11:19:58 UTC 2020

Modified Files:
src/etc/rc.d [netbsd-9]: autounmountd ip6addrctl

Log Message:
Pull up following revision(s) (requested by kim in ticket #675):

etc/rc.d/autounmountd: revision 1.3
etc/rc.d/ip6addrctl: revision 1.4

Add NetBSD ID


To generate a diff of this commit:
cvs rdiff -u -r1.1.6.1 -r1.1.6.2 src/etc/rc.d/autounmountd
cvs rdiff -u -r1.2.18.1 -r1.2.18.2 src/etc/rc.d/ip6addrctl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/autounmountd
diff -u src/etc/rc.d/autounmountd:1.1.6.1 src/etc/rc.d/autounmountd:1.1.6.2
--- src/etc/rc.d/autounmountd:1.1.6.1	Thu Aug  8 11:48:58 2019
+++ src/etc/rc.d/autounmountd	Fri Jan 31 11:19:58 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD$
+# $NetBSD: autounmountd,v 1.1.6.2 2020/01/31 11:19:58 martin Exp $
 #
 
 # PROVIDE: autounmountd

Index: src/etc/rc.d/ip6addrctl
diff -u src/etc/rc.d/ip6addrctl:1.2.18.1 src/etc/rc.d/ip6addrctl:1.2.18.2
--- src/etc/rc.d/ip6addrctl:1.2.18.1	Thu Aug  8 11:48:58 2019
+++ src/etc/rc.d/ip6addrctl	Fri Jan 31 11:19:58 2020
@@ -1,6 +1,7 @@
 #!/bin/sh
 #
-# $FreeBSD: head/etc/rc.d/ip6addrctl 270836 2014-08-30 07:08:10Z hrs $
+# $NetBSD: ip6addrctl,v 1.2.18.2 2020/01/31 11:19:58 martin Exp $
+# FreeBSD: head/etc/rc.d/ip6addrctl 270836 2014-08-30 07:08:10Z hrs
 #
 
 # PROVIDE: ip6addrctl



CVS commit: [netbsd-9] src/etc/rc.d

2019-12-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 11 14:13:40 UTC 2019

Modified Files:
src/etc/rc.d [netbsd-9]: zfs

Log Message:
Pull up following revision(s) (requested by sevan in ticket #539):

etc/rc.d/zfs: revision 1.4
etc/rc.d/zfs: revision 1.5

We don't need to require the presence of /etc/zfs/zpool.cache to unmount &
unload the module, just like for the start target.

This script just makes sure that the ZFS module loads and unloads, mountall
script takes care of mounting filesystems.

Don't try to unmount all file systems before unloading the ZFS module, leave
that to the operator in preperation or the mountall script to take care
of. Module will of course fail to unload then if file systems are still
mounted.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/etc/rc.d/zfs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/zfs
diff -u src/etc/rc.d/zfs:1.1.2.3 src/etc/rc.d/zfs:1.1.2.4
--- src/etc/rc.d/zfs:1.1.2.3	Sun Dec  8 14:42:01 2019
+++ src/etc/rc.d/zfs	Wed Dec 11 14:13:40 2019
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: zfs,v 1.1.2.3 2019/12/08 14:42:01 martin Exp $
+# $NetBSD: zfs,v 1.1.2.4 2019/12/11 14:13:40 martin Exp $
 #
 
 # PROVIDE: zfs
@@ -28,8 +28,7 @@ zfs_start()
 
 zfs_stop()
 {
-	if [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
-		zfs unmount -a
+	if [ -x /sbin/zfs ]; then
 		modunload zfs
 	fi
 	return 0;



CVS commit: [netbsd-9] src/etc/rc.d

2019-12-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec  8 14:42:02 UTC 2019

Modified Files:
src/etc/rc.d [netbsd-9]: zfs

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #516):

etc/rc.d/zfs: revision 1.2
etc/rc.d/zfs: revision 1.3

Attempt to load the zfs module even if /etc/zfs/zpool.cache is absent. The
module needs to be loaded to create a pool in the first place, and
autoloading won't work after the fact won't work at securelevel=1.

Add missing rcvar=$name


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/etc/rc.d/zfs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/rc.d/zfs
diff -u src/etc/rc.d/zfs:1.1.2.2 src/etc/rc.d/zfs:1.1.2.3
--- src/etc/rc.d/zfs:1.1.2.2	Fri Sep 27 09:18:37 2019
+++ src/etc/rc.d/zfs	Sun Dec  8 14:42:01 2019
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: zfs,v 1.1.2.2 2019/09/27 09:18:37 martin Exp $
+# $NetBSD: zfs,v 1.1.2.3 2019/12/08 14:42:01 martin Exp $
 #
 
 # PROVIDE: zfs
@@ -10,12 +10,13 @@
 $_rc_subr_loaded . /etc/rc.subr
 
 name="zfs"
+rcvar=$name
 start_cmd="zfs_start"
 stop_cmd="zfs_stop"
 
 zfs_start()
 {
-	if [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
+	if [ -x /sbin/zfs ]; then
 		# Get ZFS module loaded (and thereby, zvols created).
 		/sbin/zfs list > /dev/null 2>&1
 		if [ $? -ne 0 ]; then