Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Apr 2003 14:45:21 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 29269 for review
Message-ID:  <200304192145.h3JLjLlP007782@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=29269

Change 29269 by marcel@marcel_pluto1 on 2003/04/19 14:45:01

	IFia64

Affected files ...

.. //depot/projects/ia64_epc/MAINTAINERS#3 integrate
.. //depot/projects/ia64_epc/etc/Makefile#5 integrate
.. //depot/projects/ia64_epc/etc/network.subr#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/Makefile#4 integrate
.. //depot/projects/ia64_epc/etc/rc.d/NETWORKING#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/adjkerntz#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/atm1#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/atm2.sh#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/cleanvar#3 integrate
.. //depot/projects/ia64_epc/etc/rc.d/dhclient#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/hostname#1 branch
.. //depot/projects/ia64_epc/etc/rc.d/isdnd#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/jail#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/kldxref#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/mrouted#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/netif#1 branch
.. //depot/projects/ia64_epc/etc/rc.d/network1#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/network2#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/nisdomain#1 branch
.. //depot/projects/ia64_epc/etc/rc.d/ppp-user#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/random#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/routed#2 integrate
.. //depot/projects/ia64_epc/etc/rc.d/sppp#2 integrate
.. //depot/projects/ia64_epc/lib/libc/gen/getpwent.c#4 integrate
.. //depot/projects/ia64_epc/lib/libdevstat/devstat.c#5 integrate
.. //depot/projects/ia64_epc/libexec/tftpd/tftpd.c#3 integrate
.. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#7 integrate
.. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#11 integrate
.. //depot/projects/ia64_epc/sbin/bsdlabel/Makefile#2 integrate
.. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.8#2 integrate
.. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.c#2 integrate
.. //depot/projects/ia64_epc/sbin/bsdlabel/runtest.sh#1 branch
.. //depot/projects/ia64_epc/sbin/sunlabel/sunlabel.c#3 integrate
.. //depot/projects/ia64_epc/sys/alpha/alpha/machdep.c#4 integrate
.. //depot/projects/ia64_epc/sys/alpha/alpha/trap.c#5 integrate
.. //depot/projects/ia64_epc/sys/alpha/linux/linux_machdep.c#4 integrate
.. //depot/projects/ia64_epc/sys/dev/tx/if_tx.c#4 integrate
.. //depot/projects/ia64_epc/sys/geom/geom_bsd.c#6 integrate
.. //depot/projects/ia64_epc/sys/geom/geom_slice.c#6 integrate
.. //depot/projects/ia64_epc/sys/geom/geom_slice.h#3 integrate
.. //depot/projects/ia64_epc/sys/i386/i386/machdep.c#4 integrate
.. //depot/projects/ia64_epc/sys/i386/i386/trap.c#5 integrate
.. //depot/projects/ia64_epc/sys/i386/include/cpufunc.h#2 integrate
.. //depot/projects/ia64_epc/sys/i386/linux/linux_machdep.c#5 integrate
.. //depot/projects/ia64_epc/sys/ia64/ia64/trap.c#10 integrate
.. //depot/projects/ia64_epc/sys/kern/kern_mac.c#7 integrate
.. //depot/projects/ia64_epc/sys/kern/kern_proc.c#6 integrate
.. //depot/projects/ia64_epc/sys/kern/kern_resource.c#6 integrate
.. //depot/projects/ia64_epc/sys/kern/kern_sig.c#9 integrate
.. //depot/projects/ia64_epc/sys/kern/kern_thread.c#11 integrate
.. //depot/projects/ia64_epc/sys/kern/uipc_jumbo.c#4 integrate
.. //depot/projects/ia64_epc/sys/kern/vfs_bio.c#8 integrate
.. //depot/projects/ia64_epc/sys/pc98/i386/machdep.c#4 integrate
.. //depot/projects/ia64_epc/sys/powerpc/powerpc/busdma_machdep.c#7 integrate
.. //depot/projects/ia64_epc/sys/security/mac_ifoff/mac_ifoff.c#3 integrate
.. //depot/projects/ia64_epc/sys/sparc64/sparc64/trap.c#5 integrate
.. //depot/projects/ia64_epc/sys/sys/cdefs.h#2 integrate
.. //depot/projects/ia64_epc/sys/sys/mac.h#5 integrate
.. //depot/projects/ia64_epc/sys/sys/mac_policy.h#5 integrate
.. //depot/projects/ia64_epc/sys/sys/proc.h#9 integrate
.. //depot/projects/ia64_epc/sys/sys/syscallsubr.h#2 integrate
.. //depot/projects/ia64_epc/sys/vm/swap_pager.c#3 integrate
.. //depot/projects/ia64_epc/sys/vm/uma_core.c#6 integrate
.. //depot/projects/ia64_epc/sys/vm/vm_map.c#6 integrate
.. //depot/projects/ia64_epc/sys/vm/vm_object.c#7 integrate
.. //depot/projects/ia64_epc/sys/vm/vm_object.h#5 integrate
.. //depot/projects/ia64_epc/usr.bin/passwd/passwd.c#2 integrate

Differences ...

==== //depot/projects/ia64_epc/MAINTAINERS#3 (text+ko) ====

@@ -1,4 +1,4 @@
-$FreeBSD: src/MAINTAINERS,v 1.58 2003/02/18 00:07:06 jmallett Exp $
+$FreeBSD: src/MAINTAINERS,v 1.59 2003/04/18 21:17:46 nectar Exp $
 
 subsystem	login	notes
 -----------------------------
@@ -77,3 +77,5 @@
 libufs		jmallett	Willing to handle problems, help with work.
 fdc(4)		joerg	Just keep me informed of changes, try not to break it.
 sppp(4)		joerg	Just keep me informed of changes, try not to break it.
+libc		nectar	Opportuntity for pre-commit review appreciated for
+			nsdispatch(3) and its consumers.

==== //depot/projects/ia64_epc/etc/Makefile#5 (text+ko) ====

@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
-# $FreeBSD: src/etc/Makefile,v 1.308 2003/04/08 16:14:02 des Exp $
+# $FreeBSD: src/etc/Makefile,v 1.309 2003/04/18 17:51:53 mtm Exp $
 
 .if !defined(NO_SENDMAIL)
 SUBDIR=	sendmail
@@ -10,7 +10,7 @@
 	devd.conf dhclient.conf disktab fbtab ftpusers gettytab group \
 	hosts hosts.allow hosts.equiv hosts.lpd \
 	inetd.conf login.access login.conf \
-	mac.conf motd netconfig networks newsyslog.conf \
+	mac.conf motd netconfig network.subr networks newsyslog.conf \
 	phones printcap profile protocols \
 	rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \
 	rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \

==== //depot/projects/ia64_epc/etc/network.subr#2 (text+ko) ====

@@ -1,67 +1,121 @@
-#!/bin/sh -x
+#
+# Copyright (c) 2003 The FreeBSD Project. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/network.subr,v 1.145 2003/02/12 04:26:10 imp Exp $
+# $FreeBSD: src/etc/network.subr,v 1.146 2003/04/18 17:51:53 mtm Exp $
 #
 
-# PROVIDE: network1
-# REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl tty
-# KEYWORD: FreeBSD
+#
+# Subroutines commonly used from network startup scripts.
+# Requires that rc.conf be loaded first.
+#
 
-. /etc/rc.subr
+# ifconfig_up if
+#	Evaluate ifconfig(8) arguments for interface $if and
+#	run ifconfig(8) with those arguments. It returns 0 if
+#	arguments were found and executed or 1 if the interface
+#	had no arguments.
+#
+ifconfig_up()
+{
+	eval ifconfig_args=\$ifconfig_$1
+	if [ -n "${ifconfig_args}" ]; then
+		ifconfig $1 ${ifconfig_args}
+		return 0
+	fi
+	return 1
+}
 
-name="network1"
-start_cmd="network_start"
-stop_cmd="network_stop"
+# ifalias_up if
+#	Configure aliases for network interface $if.
+#	It returns 0 if at least one alias was configured or
+#	1 if there were none.
+#
+ifalias_up()
+{
+	_ret=1
+	alias=0
+	while : ; do
+		eval ifconfig_args=\$ifconfig_$1_alias${alias}
+		if [ -n "${ifconfig_args}" ]; then
+			ifconfig $1 ${ifconfig_args} alias
+			alias=$((${alias} + 1))
+			_ret=0
+		else
+			break
+		fi
+	done
+	return $_ret
+}
 
-convert_host_conf()
+# ifscript_up if
+#	Evaluate a startup script for the $if interface.
+#	It returns 0 if a script was found and processed or
+#	1 if no script was found.
+#
+ifscript_up()
 {
-	host_conf=$1; shift;
-	nsswitch_conf=$1; shift;
-	awk '                                                               \
-	/^[:blank:]*#/       { next }                                       \
-	/(hosts|local|file)/ { nsswitch[c] = "files"; c++; next }           \
-	/(dns|bind)/         { nsswitch[c] = "dns";   c++; next }           \
-	/nis/                { nsswitch[c] = "nis";   c++; next }           \
-	{ printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" }    \
-	END {                                                               \
-		printf "hosts: ";                                           \
-		for (i in nsswitch) printf "%s ", nsswitch[i];              \
-		printf "\n";                                                \
-	}' < $host_conf > $nsswitch_conf
+	if [ -r /etc/start_if.$1 ]; then
+		. /etc/start_if.$1
+		return 0
+	fi
+	return 1
 }
 
-generate_host_conf()
+# Create cloneable interfaces.
+#
+clone_up()
 {
-	nsswitch_conf=$1; shift;
-	host_conf=$1; shift;
+	_prefix=
+	_list=
+	for ifn in ${cloned_interfaces}; do
+		ifconfig ${ifn} create
+		if $? ; then
+			_list="${_list}${_prefix}${ifn}"
+			[ -z "$_prefix" ] && _prefix=' '
+		fi
+	done
+	debug "Cloned: ${_list}"
+}
 
-	awk '
-	BEGIN {
-		xlat["files"] = "hosts";
-		xlat["dns"] = "bind";
-		xlat["nis"] = "nis";
-		cont = 0;
-	}
-	sub(/^[\t ]*hosts:/, "") || cont {
-		if (!cont)
-			srcs = ""
-		sub(/#.*/, "")
-		gsub(/[][]/, " & ")
-		cont = sub(/\\$/, "")
-		srcs = srcs " " $0
-	}
-	END {
-		print "# Auto-generated from nsswitch.conf, do not edit"
-		ns = split(srcs, s)
-		for (n = 1; n <= ns; ++n) {
-			if (s[n] in xlat)
-			    print xlat[s[n]]
-		}
-	}
-	' <$nsswitch_conf >$host_conf
+# Destroy cloned interfaces. Destroyed interfaces are echoed
+# to standard output.
+#
+clone_down()
+{
+	_prefix=
+	_list=
+	for ifn in ${cloned_interfaces}; do
+		ifconfig ${ifn} destroy
+		if $? ; then
+			_list="${_list}${_prefix}${ifn}"
+			[ -z "$_prefix" ] && _prefix=' '
+		fi
+	done
+	debug "Destroyed clones: ${_list}"
 }
 
-network_gif_setup() {
+gif_up() {
 	case ${gif_interfaces} in
 	[Nn][Oo] | '')
 		;;
@@ -83,144 +137,78 @@
 	esac
 }
 
-network_start()
+#
+# ipx_up ifn
+# Configure any IPX addresses for interface $ifn. Returns 0 if IPX
+# arguments were found and configured; returns 1 otherwise.
+#
+ipx_up()
 {
-	# set hostname, turn on network
-	#
-	echo -n "Doing initial network setup:"
-
-	# Generate host.conf for compatibility
-	#
-	if [ -f "/etc/nsswitch.conf" ]; then
-		echo -n ' host.conf'
-		generate_host_conf /etc/nsswitch.conf /etc/host.conf
+	ifn="$1"
+	eval ifconfig_args=\$ifconfig_${ifn}_ipx
+	if [ -n "${ifconfig_args}" ]; then
+		ifconfig ${ifn} ${ifconfig_args}
+		return 0
 	fi
+	return 1
+}
 
-	# Convert host.conf to nsswitch.conf if necessary
-	#
-	if [ -f "/etc/host.conf" -a ! -f "/etc/nsswitch.conf" ]; then
-		echo ''
-		echo 'Warning: /etc/host.conf is no longer used'
-		echo '  /etc/nsswitch.conf will be created for you'
-		convert_host_conf /etc/host.conf /etc/nsswitch.conf
-	fi
+#
+# list_net_interfaces type
+#	List all network interfaces. The type of interface returned
+#	can be controlled by the type argument. The type
+#	argument can be any of the following:
+#		nodhcp - all interfaces, excluding DHCP configured interfaces
+#		dhcp   - list only DHCP configured interfaces
+#	If no argument is specified all network interfaces are output.
+#	Note that the list always includes cloned interfaces.
+#
+list_net_interfaces()
+{
+	type=$1
 
-	# Set the host name if it is not already set
+	# Get a list of ALL the interfaces
 	#
-	if [ -z "`hostname -s`" ]; then
-		hostname ${hostname}
-		echo -n ' hostname'
-	fi
-
-	# Set the domainname if we're using NIS
-	#
-	case ${nisdomainname} in
-	[Nn][Oo]|'')
-		;;
-	*)
-		domainname ${nisdomainname}
-		echo -n ' domain'
-		;;
-	esac
-
-	echo '.'
-
-	# Attempt to create cloned interfaces.
-	for ifn in ${cloned_interfaces}; do
-		ifconfig ${ifn} create
-	done
-
-	# gifconfig
-	network_gif_setup
-
-	# Set up all the network interfaces, calling startup scripts if needed
-	#
 	case ${network_interfaces} in
 	[Aa][Uu][Tt][Oo])
-		network_interfaces="`ifconfig -l`"
+		_tmplist="`ifconfig -l`"
 		;;
 	*)
-		network_interfaces="${network_interfaces} ${cloned_interfaces}"
+		_tmplist="${network_interfaces}"
 		;;
 	esac
+	_tmplist="${_tmplist} ${cloned_interfaces}"
 
-	dhcp_interfaces=""
-	for ifn in ${network_interfaces}; do
-		if [ -r /etc/start_if.${ifn} ]; then
-			. /etc/start_if.${ifn}
-			eval showstat_$ifn=1
-		fi
+	if [ -z "$type" ]; then
+		echo $_tmplist
+		return 0
+	fi
 
-		# Do the primary ifconfig if specified
-		#
-		eval ifconfig_args=\$ifconfig_${ifn}
-
-		case ${ifconfig_args} in
-		'')
-			;;
+	# Separate out dhcp and non-dhcp intefraces
+	#
+	_aprefix=
+	_brefix=
+	for _if in ${_tmplist} ; do
+		eval _ifarg="\$ifconfig_${_if}"
+		case "$_ifarg" in
 		[Dd][Hh][Cc][Pp])
-			# DHCP inits are done all in one go below
-			dhcp_interfaces="$dhcp_interfaces $ifn"
-			eval showstat_$ifn=1
+			_dhcplist="${_dhcplist}${_aprefix}${_if}"
+			[ -z "$_aprefix" ] && _aprefix=' '
 			;;
-		*)
-			ifconfig ${ifn} ${ifconfig_args}
-			eval showstat_$ifn=1
+		''|*)
+			_nodhcplist="${_nodhcplist}${_bprefix}${_if}"
+			[ -z "$_bprefix" ] && _bprefix=' '
 			;;
 		esac
 	done
 
-	if [ ! -z "${dhcp_interfaces}" ]; then
-		${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
-	fi
-
-	for ifn in ${network_interfaces}; do
-		# Check to see if aliases need to be added
-		#
-		alias=0
-		while : ; do
-			eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
-			if [ -n "${ifconfig_args}" ]; then
-				ifconfig ${ifn} ${ifconfig_args} alias
-				eval showstat_$ifn=1
-				alias=$((${alias} + 1))
-			else
-				break;
-			fi
-		done
-
-		# Do ipx address if specified
-		#
-		eval ifconfig_args=\$ifconfig_${ifn}_ipx
-		if [ -n "${ifconfig_args}" ]; then
-			ifconfig ${ifn} ${ifconfig_args}
-			eval showstat_$ifn=1
-		fi
-	done
-
-	# Display ifconfiged interfaces
-	for ifn in ${network_interfaces}; do
-		eval showstat=\$showstat_${ifn}
-		if [ ! -z ${showstat} ]; then
-			ifconfig ${ifn}
-		fi
-	done
-
-	# Resync ipfilter
-	/etc/rc.d/ipfilter resync
-}
-
-network_stop()
-{
-	echo -n "Stopping network:"
-
-	# flush routes
-	#
-	echo -n " flush routes"
-	route -n flush
-
-	echo '.'
+	case "$type" in
+	nodhcp)
+		echo $_nodhcplist
+		;;
+	dhcp)
+		echo $_dhcplist
+		;;
+	esac
+	return 0			
 }
-
-load_rc_config $name
-run_rc_command "$1"

==== //depot/projects/ia64_epc/etc/rc.d/Makefile#4 (text+ko) ====

@@ -1,16 +1,16 @@
 # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $
-# $FreeBSD: src/etc/rc.d/Makefile,v 1.12 2003/04/16 16:27:23 mtm Exp $
+# $FreeBSD: src/etc/rc.d/Makefile,v 1.14 2003/04/19 01:56:44 mtm Exp $
 
 .include <bsd.own.mk>
 
 FILES=	DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz amd \
 	apm apmd atm1 atm2.sh atm3.sh archdep bgfsck bootparams ccd cleanvar \
-	cleartmp cron devd devdb devfs diskless dmesg dumpon fsck inetd \
-	initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat ipsec \
-	ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig local \
-	localdaemons lomac lpd motd mountcritlocal mountcritremote \
-	mountd moused mroute6d mrouted msgs named network1 network2 \
-	network3 network_ipv6 nfsclient nfsd nfslocking nfsserver ntpd \
+	cleartmp cron devd devdb devfs dhclient diskless dmesg dumpon fsck \
+	hostname inetd initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat \
+	ipsec ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig \
+	local localdaemons lomac lpd motd mountcritlocal mountcritremote \
+	mountd moused mroute6d mrouted msgs named netif network1 network2 network3 \
+	network_ipv6 nfsclient nfsd nfslocking nfsserver nisdomain ntpd \
 	ntpdate othermta pccard pcvt ppp-user pppoed pwcheck quota random \
 	rarpd rcconf.sh root route6d routed rpcbind rtadvd rwho savecore \
 	securelevel sendmail serial sppp sshd swap1 syscons sysctl \

==== //depot/projects/ia64_epc/etc/rc.d/NETWORKING#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
 # $NetBSD: NETWORKING,v 1.2 2002/03/22 04:33:57 thorpej Exp $
-# $FreeBSD: src/etc/rc.d/NETWORKING,v 1.4 2003/01/25 23:14:08 mtm Exp $
+# $FreeBSD: src/etc/rc.d/NETWORKING,v 1.5 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: NETWORKING NETWORK
-# REQUIRE: network dhclient altqd network1 network2 network_ipv6 isdnd ppp-user
+# REQUIRE: network dhclient altqd netif network2 network_ipv6 isdnd ppp-user
 # REQUIRE: routed mrouted route6d mroute6d
 # KEYWORD: FreeBSD NetBSD
 

==== //depot/projects/ia64_epc/etc/rc.d/adjkerntz#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/adjkerntz,v 1.1 2002/06/13 22:14:36 gordon Exp $
+# $FreeBSD: src/etc/rc.d/adjkerntz,v 1.2 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: adjkerntz
 # REQUIRE: diskless mountcritlocal random
-# BEFORE: network1
+# BEFORE: netif
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/atm1#2 (text+ko) ====

@@ -24,12 +24,12 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.d/atm1,v 1.11 2002/09/30 08:01:43 mdodd Exp $
+# $FreeBSD: src/etc/rc.d/atm1,v 1.12 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: atm1
 # REQUIRE: root
-# BEFORE: network1
+# BEFORE: netif
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/atm2.sh#2 (text+ko) ====

@@ -24,11 +24,11 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.11 2002/10/12 10:31:31 schweikh Exp $
+# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.12 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: atm2
-# REQUIRE: atm1 network1
+# REQUIRE: atm1 netif
 # BEFORE: network2
 # KEYWORD: FreeBSD
 

==== //depot/projects/ia64_epc/etc/rc.d/cleanvar#3 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/cleanvar,v 1.3 2003/02/15 06:00:11 mtm Exp $
+# $FreeBSD: src/etc/rc.d/cleanvar,v 1.4 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: cleanvar
 # REQUIRE: adjkerntz mountcritlocal
-# BEFORE: network1
+# BEFORE: netif
 # KEYWORD: FreeBSD
 
 purgedir()

==== //depot/projects/ia64_epc/etc/rc.d/dhclient#2 (text+ko) ====

@@ -1,23 +1,53 @@
 #!/bin/sh
 #
 # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $
-# $FreeBSD: src/etc/rc.d/dhclient,v 1.2 2002/06/13 22:14:36 gordon Exp $
+# $FreeBSD: src/etc/rc.d/dhclient,v 1.3 2003/04/18 17:53:02 mtm Exp $
 #
 
 # PROVIDE: dhclient
-# REQUIRE: network mountcritlocal
+# REQUIRE: network netif mountcritlocal
 # BEFORE:  NETWORKING
+# KEYWORD: FreeBSD NetBSD
 #
 #	Note that there no syslog logging of dhclient messages at boot because
 #	dhclient needs to start before services that syslog depends upon do.
 #
 
 . /etc/rc.subr
+. /etc/network.subr
 
 name="dhclient"
-rcvar=$name
 command="/sbin/${name}"
 pidfile="/var/run/${name}.pid"
+case "${OSTYPE}" in
+FreeBSD)
+	rcvar=
+	start_precmd="dhclient_prestart"
+	start_postcmd="dhclient_poststart"
+	;;
+NetBSD)
+	rcvar=$name
+	;;
+esac
+
+dhclient_prestart()
+{
+	dhcp_list="`list_net_interfaces dhcp`"
+	if [ -z "$dhcp_list" ]; then
+		return 1
+	fi
+	rc_flags="${rc_flags} ${dhcp_flags} ${dhcp_list}"
+	return 0
+}
+
+dhclient_poststart()
+{
+	for ifn in ${dhcp_list}; do
+		ifalias_up ${ifn}
+		ipx_up ${ifn}
+		ifconfig ${ifn}
+	done
+}
 
 load_rc_config $name
 run_rc_command "$1"

==== //depot/projects/ia64_epc/etc/rc.d/isdnd#2 (text+ko) ====

@@ -1,13 +1,13 @@
 #!/bin/sh
 #
 # $NetBSD: isdnd,v 1.9 2002/04/10 23:37:13 martin Exp $
-# $FreeBSD: src/etc/rc.d/isdnd,v 1.13 2003/01/25 23:03:48 mtm Exp $
+# $FreeBSD: src/etc/rc.d/isdnd,v 1.14 2003/04/18 17:55:05 mtm Exp $
 #
 # Mostly based on original script (/etc/rc.isdn) written by  Hellmuth Michaelis
 #
 
 # PROVIDE: isdnd
-# REQUIRE: network1 mountcritlocal
+# REQUIRE: netif mountcritlocal
 # KEYWORD: FreeBSD NetBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/jail#2 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/jail,v 1.2 2003/04/16 16:44:00 mtm Exp $
+# $FreeBSD: src/etc/rc.d/jail,v 1.3 2003/04/19 07:50:32 mtm Exp $
 #
 
 # PROVIDE: jail
@@ -51,7 +51,7 @@
 		eval jail_rootdir=\"\$jail_${_jail}_rootdir\"
 		eval jail_hostname=\"\$jail_${_jail}_hostname\"
 		eval jail_ip=\"\$jail_${_jail}_ip\"
-		eval jail_exec=\"\$jail_${_jail_name}_exec\"
+		eval jail_exec=\"\$jail_${_jail}_exec\"
 		[ -z ${jail_exec} ] && jail_exec="/bin/sh /etc/rc"
 		
 		jail ${jail_rootdir} ${jail_hostname} ${jail_ip} ${jail_exec}

==== //depot/projects/ia64_epc/etc/rc.d/kldxref#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/kldxref,v 1.1 2003/03/17 23:15:52 cjc Exp $
+# $FreeBSD: src/etc/rc.d/kldxref,v 1.2 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: kldxref
 # REQUIRE: root mountcritlocal
-# BEFORE:  network1
+# BEFORE:  netif
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/mrouted#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
 # $NetBSD: mrouted,v 1.6 2002/03/22 04:33:59 thorpej Exp $
-# $FreeBSD: src/etc/rc.d/mrouted,v 1.3 2003/01/25 23:14:08 mtm Exp $
+# $FreeBSD: src/etc/rc.d/mrouted,v 1.4 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: mrouted
-# REQUIRE: network1 network2
+# REQUIRE: netif network2
 # KEYWORD: FreeBSD NetBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/network1#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh -x
 #
-# $FreeBSD: src/etc/rc.d/network1,v 1.145 2003/02/12 04:26:10 imp Exp $
+# $FreeBSD: src/etc/rc.d/network1,v 1.146 2003/04/18 17:51:54 mtm Exp $
 #
 
 # PROVIDE: network1
 # REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl tty
-# KEYWORD: FreeBSD
+# KEYWORD: FreeBSD nostart
 
 . /etc/rc.subr
 

==== //depot/projects/ia64_epc/etc/rc.d/network2#2 (text+ko) ====

@@ -2,11 +2,11 @@
 #
 # Configure routing and miscellaneous network tunables
 #
-# $FreeBSD: src/etc/rc.d/network2,v 1.135 2002/06/13 22:14:36 gordon Exp $
+# $FreeBSD: src/etc/rc.d/network2,v 1.136 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: network2
-# REQUIRE: network1 ppp-user
+# REQUIRE: netif ppp-user
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/ppp-user#2 (text+ko) ====

@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/ppp-user,v 1.3 2003/01/25 23:03:48 mtm Exp $
+# $FreeBSD: src/etc/rc.d/ppp-user,v 1.4 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: ppp-user
-# REQUIRE: network1 isdnd
+# REQUIRE: netif isdnd
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/random#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/random,v 1.2 2002/10/12 10:31:31 schweikh Exp $
+# $FreeBSD: src/etc/rc.d/random,v 1.3 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: random
 # REQUIRE: diskless mountcritlocal initrandom
-# BEFORE: network1
+# BEFORE: netif
 # KEYWORD: FreeBSD shutdown
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/routed#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
 # $NetBSD: routed,v 1.7 2002/03/22 04:34:00 thorpej Exp $
-# $FreeBSD: src/etc/rc.d/routed,v 1.4 2003/01/25 23:14:08 mtm Exp $
+# $FreeBSD: src/etc/rc.d/routed,v 1.5 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: routed
-# REQUIRE: network1 network2
+# REQUIRE: netif network2
 # KEYWORD: FreeBSD NetBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/etc/rc.d/sppp#2 (text+ko) ====

@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/sppp,v 1.1 2002/06/13 22:14:36 gordon Exp $
+# $FreeBSD: src/etc/rc.d/sppp,v 1.2 2003/04/18 17:55:05 mtm Exp $
 #
 
 # PROVIDE: sppp
 # REQUIRE: root
-# BEFORE: network1
+# BEFORE: netif
 # KEYWORD: FreeBSD
 
 . /etc/rc.subr

==== //depot/projects/ia64_epc/lib/libc/gen/getpwent.c#4 (text+ko) ====

@@ -31,7 +31,7 @@
  *
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/getpwent.c,v 1.74 2003/04/18 17:27:05 nectar Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/getpwent.c,v 1.76 2003/04/18 22:07:30 nectar Exp $");
 
 #include "namespace.h"
 #include <sys/param.h>
@@ -91,7 +91,7 @@
 	    const char *, uid_t);
 int	__pw_parse_entry(char *, size_t, struct passwd *, int, int *errnop);
 
-static	int	 pwd_init(struct passwd *, char *, size_t);
+static	void	 pwd_init(struct passwd *);
 
 union key {
 	const char	*name;
@@ -268,10 +268,9 @@
 	};
 	int	rv, ret_errno;
 
+	pwd_init(pwd);
+	ret_errno = 0;
 	*result = NULL;
-	ret_errno = pwd_init(pwd, buffer, bufsize);
-	if (ret_errno != 0)
-		return (ret_errno);
 	rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwent_r", defaultsrc,
 	    pwd, buffer, bufsize, &ret_errno);
 	if (rv == NS_SUCCESS)
@@ -298,10 +297,9 @@
 	};
 	int	rv, ret_errno;
 
+	pwd_init(pwd);
+	ret_errno = 0;
 	*result = NULL;
-	ret_errno = pwd_init(pwd, buffer, bufsize);
-	if (ret_errno != 0)
-		return (ret_errno);
 	rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwnam_r", defaultsrc,
 	    name, pwd, buffer, bufsize, &ret_errno);
 	if (rv == NS_SUCCESS)
@@ -328,10 +326,9 @@
 	};
 	int	rv, ret_errno;
 
+	pwd_init(pwd);
+	ret_errno = 0;
 	*result = NULL;
-	ret_errno = pwd_init(pwd, buffer, bufsize);
-	if (ret_errno != 0)
-		return (ret_errno);
 	rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwuid_r", defaultsrc,
 	    uid, pwd, buffer, bufsize, &ret_errno);
 	if (rv == NS_SUCCESS)
@@ -341,23 +338,20 @@
 }
 
 
-static int
-pwd_init(struct passwd *pwd, char *buffer, size_t bufsize)
+static void
+pwd_init(struct passwd *pwd)
 {
+	static char nul[] = "";
 
-	if (bufsize < 1)
-		return (ERANGE);
-	buffer[0] = '\0';
 	memset(pwd, 0, sizeof(*pwd));
 	pwd->pw_uid = (uid_t)-1;  /* Considered least likely to lead to */
 	pwd->pw_gid = (gid_t)-1;  /* a security issue.                  */
-	pwd->pw_name = buffer;
-	pwd->pw_passwd = buffer;
-	pwd->pw_class = buffer;
-	pwd->pw_gecos = buffer;
-	pwd->pw_dir = buffer;
-	pwd->pw_shell = buffer;
-	return (0);
+	pwd->pw_name = nul;
+	pwd->pw_passwd = nul;
+	pwd->pw_class = nul;
+	pwd->pw_gecos = nul;
+	pwd->pw_dir = nul;
+	pwd->pw_shell = nul;
 }
 
 
@@ -1436,8 +1430,9 @@
 	size_t			 bufsize;
 	uid_t			 uid;
 	uint32_t		 store;
-	int			 rv, stayopen, *errnop;
+	int			 rv, from_compat, stayopen, *errnop;
 
+	from_compat = 0;
 	name = NULL;
 	uid = (uid_t)-1;
 	how = (enum nss_lookup_type)mdata;
@@ -1516,8 +1511,10 @@
 	default:
 		break;
 	}
-	if (rv & NS_TERMINATE)
+	if (rv & NS_TERMINATE) {
+		from_compat = 1;
 		goto fin;
+	}
 	key.data = keybuf;
 	rv = NS_NOTFOUND;
 	while (st->keynum >= 0) {
@@ -1626,8 +1623,14 @@
 		(void)st->db->close(st->db);
 		st->db = NULL;
 	}
-	if (rv == NS_SUCCESS && retval != NULL)
-		*(struct passwd **)retval = pwd;
+	if (rv == NS_SUCCESS) { 
+		if (!from_compat) {
+			pwd->pw_fields &= ~_PWF_SOURCE;
+			pwd->pw_fields |= _PWF_FILES;
+		}
+		if (retval != NULL)
+			*(struct passwd **)retval = pwd;
+	}
 	return (rv);
 }
 

==== //depot/projects/ia64_epc/lib/libdevstat/devstat.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libdevstat/devstat.c,v 1.22 2003/04/09 07:49:15 phk Exp $");
+__FBSDID("$FreeBSD: src/lib/libdevstat/devstat.c,v 1.23 2003/04/19 07:42:13 phk Exp $");
 
 #include <sys/types.h>
 #include <sys/sysctl.h>
@@ -47,6 +47,14 @@
 
 #include "devstat.h"
 
+int
+compute_stats(struct devstat *current, struct devstat *previous,
+	      long double etime, u_int64_t *total_bytes,
+	      u_int64_t *total_transfers, u_int64_t *total_blocks,
+	      long double *kb_per_transfer, long double *transfers_per_second,
+	      long double *mb_per_second, long double *blocks_per_second,
+	      long double *ms_per_transaction);
+
 typedef enum {
 	DEVSTAT_ARG_NOTYPE,
 	DEVSTAT_ARG_UINT64,

==== //depot/projects/ia64_epc/libexec/tftpd/tftpd.c#3 (text+ko) ====

@@ -42,7 +42,7 @@
 static char sccsid[] = "@(#)tftpd.c	8.1 (Berkeley) 6/4/93";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/libexec/tftpd/tftpd.c,v 1.26 2003/03/20 22:42:22 dwmalone Exp $";

>>> TRUNCATED FOR MAIL (1000 lines) <<<


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304192145.h3JLjLlP007782>