head	1.3;
access;
symbols
	netbsd-11-0-RC4:1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.62
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.60
	perseant-exfatfs-base:1.3
	netbsd-8-3-RELEASE:1.3
	netbsd-9-4-RELEASE:1.3
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.58
	netbsd-10-base:1.3
	netbsd-9-3-RELEASE:1.3
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.56
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	netbsd-9-2-RELEASE:1.3
	cjep_staticlib_x:1.3.0.54
	cjep_staticlib_x-base:1.3
	netbsd-9-1-RELEASE:1.3
	phil-wifi-20200421:1.3
	phil-wifi-20200411:1.3
	is-mlppp:1.3.0.52
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	netbsd-8-2-RELEASE:1.3
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.3
	netbsd-9:1.3.0.50
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.3
	netbsd-8-1-RC1:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	netbsd-7-2-RELEASE:1.3
	pgoyette-compat-0728:1.3
	netbsd-8-0-RELEASE:1.3
	phil-wifi:1.3.0.48
	phil-wifi-base:1.3
	pgoyette-compat-0625:1.3
	netbsd-8-0-RC2:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	netbsd-8-0-RC1:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	netbsd-7-1-2-RELEASE:1.3
	pgoyette-compat:1.3.0.46
	pgoyette-compat-base:1.3
	netbsd-7-1-1-RELEASE:1.3
	matt-nb8-mediatek:1.3.0.44
	matt-nb8-mediatek-base:1.3
	perseant-stdc-iso10646:1.3.0.42
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.3.0.40
	netbsd-8-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.38
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	netbsd-7-1:1.3.0.36
	netbsd-7-1-RELEASE:1.3
	netbsd-7-1-RC2:1.3
	netbsd-7-nhusb-base-20170116:1.3
	bouyer-socketcan:1.3.0.34
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	netbsd-7-1-RC1:1.3
	pgoyette-localcount-20161104:1.3
	netbsd-7-0-2-RELEASE:1.3
	localcount-20160914:1.3
	netbsd-7-nhusb:1.3.0.32
	netbsd-7-nhusb-base:1.3
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.30
	pgoyette-localcount-base:1.3
	netbsd-7-0-1-RELEASE:1.3
	netbsd-7-0:1.3.0.28
	netbsd-7-0-RELEASE:1.3
	netbsd-7-0-RC3:1.3
	netbsd-7-0-RC2:1.3
	netbsd-7-0-RC1:1.3
	netbsd-5-2-3-RELEASE:1.2.2.3
	netbsd-5-1-5-RELEASE:1.2.2.3
	netbsd-6-0-6-RELEASE:1.3
	netbsd-6-1-5-RELEASE:1.3
	netbsd-7:1.3.0.26
	netbsd-7-base:1.3
	yamt-pagecache-base9:1.3
	yamt-pagecache-tag8:1.3
	netbsd-6-1-4-RELEASE:1.3
	netbsd-6-0-5-RELEASE:1.3
	tls-earlyentropy:1.3.0.24
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3
	riastradh-drm2-base3:1.3
	netbsd-6-1-3-RELEASE:1.3
	netbsd-6-0-4-RELEASE:1.3
	netbsd-5-2-2-RELEASE:1.2.2.3
	netbsd-5-1-4-RELEASE:1.2.2.3
	netbsd-6-1-2-RELEASE:1.3
	netbsd-6-0-3-RELEASE:1.3
	netbsd-5-2-1-RELEASE:1.2.2.3
	netbsd-5-1-3-RELEASE:1.2.2.3
	netbsd-6-1-1-RELEASE:1.3
	riastradh-drm2-base2:1.3
	riastradh-drm2-base1:1.3
	riastradh-drm2:1.3.0.16
	riastradh-drm2-base:1.3
	netbsd-6-1:1.3.0.22
	netbsd-6-0-2-RELEASE:1.3
	netbsd-6-1-RELEASE:1.3
	khorben-n900:1.3.0.20
	netbsd-6-1-RC4:1.3
	netbsd-6-1-RC3:1.3
	agc-symver:1.3.0.18
	agc-symver-base:1.3
	netbsd-6-1-RC2:1.3
	netbsd-6-1-RC1:1.3
	yamt-pagecache-base8:1.3
	netbsd-5-2:1.2.2.3.0.10
	netbsd-6-0-1-RELEASE:1.3
	yamt-pagecache-base7:1.3
	netbsd-5-2-RELEASE:1.2.2.3
	netbsd-5-2-RC1:1.2.2.3
	matt-nb6-plus-nbase:1.3
	yamt-pagecache-base6:1.3
	netbsd-6-0:1.3.0.14
	netbsd-6-0-RELEASE:1.3
	netbsd-6-0-RC2:1.3
	tls-maxphys:1.3.0.12
	tls-maxphys-base:1.3
	matt-nb6-plus:1.3.0.10
	matt-nb6-plus-base:1.3
	netbsd-6-0-RC1:1.3
	yamt-pagecache-base5:1.3
	yamt-pagecache-base4:1.3
	netbsd-6:1.3.0.8
	netbsd-6-base:1.3
	netbsd-5-1-2-RELEASE:1.2.2.3
	netbsd-5-1-1-RELEASE:1.2.2.3
	yamt-pagecache-base3:1.3
	yamt-pagecache-base2:1.3
	yamt-pagecache:1.3.0.6
	yamt-pagecache-base:1.3
	cherry-xenmp:1.3.0.4
	cherry-xenmp-base:1.3
	bouyer-quota2-nbase:1.3
	bouyer-quota2:1.3.0.2
	bouyer-quota2-base:1.3
	matt-mips64-premerge-20101231:1.3
	matt-nb5-mips64-premerge-20101231:1.2.2.3
	matt-nb5-pq3:1.2.2.3.0.8
	matt-nb5-pq3-base:1.2.2.3
	netbsd-5-1:1.2.2.3.0.6
	netbsd-5-1-RELEASE:1.2.2.3
	netbsd-5-1-RC4:1.2.2.3
	matt-nb5-mips64-k15:1.2.2.3
	netbsd-5-1-RC3:1.2.2.3
	netbsd-5-1-RC2:1.2.2.3
	netbsd-5-1-RC1:1.2.2.3
	netbsd-5-0-2-RELEASE:1.2.2.3
	matt-nb5-mips64-premerge-20091211:1.2.2.3
	matt-premerge-20091211:1.3
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.2.2.3
	matt-nb4-mips64-k7-u2a-k9b:1.2.2.3
	matt-nb5-mips64-u1-k1-k5:1.2.2.3
	matt-nb5-mips64:1.2.2.3.0.4
	netbsd-5-0-1-RELEASE:1.2.2.3
	jym-xensuspend-nbase:1.3
	netbsd-5-0:1.2.2.3.0.2
	netbsd-5-0-RELEASE:1.2.2.3
	netbsd-5-0-RC4:1.2.2.3
	netbsd-5-0-RC3:1.2.2.3
	netbsd-5-0-RC2:1.2.2.3
	jym-xensuspend:1.2.0.4
	jym-xensuspend-base:1.3
	netbsd-5:1.2.0.2
	mjf-devfs2:1.1.0.2
	mjf-devfs2-base2:1.1;
locks; strict;
comment	@# @;


1.3
date	2009.04.21.16.08.57;	author joerg;	state Exp;
branches;
next	1.2;

1.2
date	2009.02.02.09.24.47;	author apb;	state Exp;
branches
	1.2.2.1
	1.2.4.1;
next	1.1;

1.1
date	2009.01.04.12.10.30;	author apb;	state Exp;
branches
	1.1.2.1;
next	;

1.2.2.1
date	2009.02.02.09.24.47;	author snj;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2009.02.06.00.51.42;	author snj;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2009.02.06.00.56.48;	author snj;	state Exp;
branches;
next	;

1.2.4.1
date	2009.05.13.19.18.03;	author jym;	state Exp;
branches;
next	;

1.1.2.1
date	2009.01.04.12.10.30;	author mjf;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2009.01.17.20.43.44;	author mjf;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Split fsck during boot into two phases. Check the root file system
first, mount root and run the various disk providers. Add swap and
check the remaining file systems after that.
This breaks the dependency cycle for lvm, which needs writeable /dev.
Depend on rndctl in cgd.
@
text
@#!/bin/sh
#
# $NetBSD: rndctl,v 1.2 2009/02/02 09:24:47 apb Exp $
#

# PROVIDE: rndctl
# BEFORE:  DISKS ike ipsec sshd
# REQUIRE: wdogctl

$_rc_subr_loaded . /etc/rc.subr

name="rndctl"
rcvar=$name
command="/sbin/${name}"

start_cmd="rndctl_startcmd"

rndctl_startcmd()
{
	# $rndctl_flags can contain multiple semicolon-separated
	# segments in which each segment contains optional flags
	# followed by one or more device or type names.  If none of the
	# -c/-C/-e/-E flags is specified, then "-c -e" is used.  If
	# neither of the -d/-t flags is specified, then "-d" is used.
	#
	# For example, given
	#	rndctl_flags="wd0 wd1; -t tty; -c -t net"
	# we will perform the following commands:
	#	rndctl -c -e -d wd0
	#	rndctl -c -e -d wd1
	#	rndctl -c -e -t tty
	#	rndctl -c -t net

	local args arg flags

	# Split $rndctl_flags on semicolons
	oIFS="$IFS"
	IFS=';'
	set -- $rndctl_flags
	IFS="$oIFS"
	# The outer "for args" loop cycles once per semicolon-separated
	# segment; the inner "for arg" loop cycles once per word in a
	# segment.
	for args in "$@@"; do
		#echo >&2 "${name} DEBUG: Parsing segment: $args";
		flags=''
		for arg in ${args}; do
			case "${arg}" in
				-*)
					flags="${flags} ${arg}"
					;;
				*)
					# We have a device or type name.
					# If none of -c/-C/-e/-E flags was
					# specified, add "-c -e".  If neither
					# of -d/-t was specified, add "-d".
					# Then perform the command with the
					# specified device or type name.
					#
					# Note that -d/-t flag must be last.
					#
					case "${flags}" in
					*[cCeE]*) ;;
					*)	flags="-c -e ${flags}" ;;
					esac
					case "${flags}" in
					*[dt]*) ;;
					*)	flags="${flags} -d" ;;
					esac
					#echo >&2 "${name} DEBUG: running:" \
					#    "$command $flags $arg"
					$command ${flags} ${arg}
					;;
			esac
		done
	done
}

load_rc_config $name
run_rc_command "$1"
@


1.2
log
@The -d or -t flag must appear after -c/-C/-e/-E flags, because of the
way we add the device name. after the flags.
Addresses PR 40495 from Ryo HAYASAKA.
@
text
@d3 1
a3 1
# $NetBSD: rndctl,v 1.1 2009/01/04 12:10:30 apb Exp $
d7 2
a8 1
# BEFORE: disks ike ipsec sshd
@


1.2.4.1
log
@Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d3 1
a3 1
# $NetBSD: rndctl,v 1.3 2009/04/21 16:08:57 joerg Exp $
d7 1
a7 2
# BEFORE:  DISKS ike ipsec sshd
# REQUIRE: wdogctl
@


1.2.2.1
log
@file rndctl was added on branch netbsd-5 on 2009-02-06 00:51:42 +0000
@
text
@d1 79
@


1.2.2.2
log
@Pull up following revision(s) (requested by apb in ticket #406):
	etc/defaults/rc.conf: revision 1.99
	etc/rc.d/Makefile: revision 1.73
	etc/rc.d/rndctl: revision 1.1
	share/man/man5/rc.conf.5: revision 1.127
* Add etc/rc.d/rndctl script, based on work by Brian A. Seklecki.  This
  allows you to invoke rndctl(8) during the boot.
* Add rndctl=NO and rndctl_flags="" to /etc/defaults/rc.conf.
* Document rndctl and rndctl_flags variables in rc.conf(5).
@
text
@a0 77
#!/bin/sh
#
# $NetBSD$
#

# PROVIDE: rndctl
# BEFORE: disks ike ipsec sshd

$_rc_subr_loaded . /etc/rc.subr

name="rndctl"
rcvar=$name
command="/sbin/${name}"

start_cmd="rndctl_startcmd"

rndctl_startcmd()
{
	# $rndctl_flags can contain multiple semicolon-separated
	# segments in which each segment contains optional flags
	# followed by one or more device or type names.  If none of the
	# -c/-C/-e/-E flags is specified, then "-c -e" is used.  If
	# neither of the -d/-t flags is specified, then "-d" is used.
	#
	# For example, given
	#	rndctl_flags="wd0 wd1; -t tty; -c -t net"
	# we will perform the following commands:
	#	rndctl -c -e -d wd0
	#	rndctl -c -e -d wd1
	#	rndctl -c -e -t tty
	#	rndctl -c -t net

	local args arg flags

	# Split $rndctl_flags on semicolons
	oIFS="$IFS"
	IFS=';'
	set -- $rndctl_flags
	IFS="$oIFS"
	# The outer "for args" loop cycles once per semicolon-separated
	# segment; the inner "for arg" loop cycles once per word in a
	# segment.
	for args in "$@@"; do
		#echo >&2 "${name} DEBUG: Parsing segment: $args";
		flags=''
		for arg in ${args}; do
			case "${arg}" in
				-*)
					flags="${flags} ${arg}"
					;;
				*)
					# We have a device or type name.
					# If none of -c/-C/-e/-E flags was
					# specified, add "-c -e".  If neither
					# of -d/-t was specified, add "-d".
					# Then perform the command with the
					# specified device or type name.
					#
					case "${flags}" in
					*[cCeE]*) ;;
					*)	flags="${flags} -c -e" ;;
					esac
					case "${flags}" in
					*[dt]*) ;;
					*)	flags="${flags} -d" ;;
					esac
					#echo >&2 "${name} DEBUG: running:" \
					#    "$command $flags $arg"
					$command ${flags} ${arg}
					;;
			esac
		done
	done
}

load_rc_config $name
run_rc_command "$1"
@


1.2.2.3
log
@Pull up following revision(s) (requested by apb in ticket #406):
	etc/rc.d/rndctl: revision 1.2
The -d or -t flag must appear after -c/-C/-e/-E flags, because of the
way we add the device name. after the flags.
Addresses PR 40495 from Ryo HAYASAKA.
@
text
@d3 1
a3 1
# $NetBSD: rndctl,v 1.2.2.2 2009/02/06 00:51:42 snj Exp $
a58 2
					# Note that -d/-t flag must be last.
					#
d61 1
a61 1
					*)	flags="-c -e ${flags}" ;;
@


1.1
log
@* Add etc/rc.d/rndctl script, based on work by Brian A. Seklecki.  This
  allows you to invoke rndctl(8) during the boot.
* Add rndctl=NO and rndctl_flags="" to /etc/defaults/rc.conf.
* Document rndctl and rndctl_flags variables in rc.conf(5).
@
text
@d3 1
a3 1
# $NetBSD$
d59 2
d63 1
a63 1
					*)	flags="${flags} -c -e" ;;
@


1.1.2.1
log
@file rndctl was added on branch mjf-devfs2 on 2009-01-17 20:43:44 +0000
@
text
@d1 77
@


1.1.2.2
log
@Sync with HEAD.
@
text
@a0 77
#!/bin/sh
#
# $NetBSD$
#

# PROVIDE: rndctl
# BEFORE: disks ike ipsec sshd

$_rc_subr_loaded . /etc/rc.subr

name="rndctl"
rcvar=$name
command="/sbin/${name}"

start_cmd="rndctl_startcmd"

rndctl_startcmd()
{
	# $rndctl_flags can contain multiple semicolon-separated
	# segments in which each segment contains optional flags
	# followed by one or more device or type names.  If none of the
	# -c/-C/-e/-E flags is specified, then "-c -e" is used.  If
	# neither of the -d/-t flags is specified, then "-d" is used.
	#
	# For example, given
	#	rndctl_flags="wd0 wd1; -t tty; -c -t net"
	# we will perform the following commands:
	#	rndctl -c -e -d wd0
	#	rndctl -c -e -d wd1
	#	rndctl -c -e -t tty
	#	rndctl -c -t net

	local args arg flags

	# Split $rndctl_flags on semicolons
	oIFS="$IFS"
	IFS=';'
	set -- $rndctl_flags
	IFS="$oIFS"
	# The outer "for args" loop cycles once per semicolon-separated
	# segment; the inner "for arg" loop cycles once per word in a
	# segment.
	for args in "$@@"; do
		#echo >&2 "${name} DEBUG: Parsing segment: $args";
		flags=''
		for arg in ${args}; do
			case "${arg}" in
				-*)
					flags="${flags} ${arg}"
					;;
				*)
					# We have a device or type name.
					# If none of -c/-C/-e/-E flags was
					# specified, add "-c -e".  If neither
					# of -d/-t was specified, add "-d".
					# Then perform the command with the
					# specified device or type name.
					#
					case "${flags}" in
					*[cCeE]*) ;;
					*)	flags="${flags} -c -e" ;;
					esac
					case "${flags}" in
					*[dt]*) ;;
					*)	flags="${flags} -d" ;;
					esac
					#echo >&2 "${name} DEBUG: running:" \
					#    "$command $flags $arg"
					$command ${flags} ${arg}
					;;
			esac
		done
	done
}

load_rc_config $name
run_rc_command "$1"
@


