From owner-p4-projects@FreeBSD.ORG Sun Jun 29 13:10:16 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7361E37B404; Sun, 29 Jun 2003 13:10:15 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF6B637B401 for ; Sun, 29 Jun 2003 13:10:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E920E43F93 for ; Sun, 29 Jun 2003 13:10:13 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h5TKAD0U054344 for ; Sun, 29 Jun 2003 13:10:13 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h5TKADaD054341 for perforce@freebsd.org; Sun, 29 Jun 2003 13:10:13 -0700 (PDT) Date: Sun, 29 Jun 2003 13:10:13 -0700 (PDT) Message-Id: <200306292010.h5TKADaD054341@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 33851 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 20:10:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=33851 Change 33851 by marcel@marcel_nfs on 2003/06/29 13:09:38 IFC @33848 Affected files ... .. //depot/projects/ia64/bin/csh/Makefile#9 integrate .. //depot/projects/ia64/bin/ed/Makefile#7 integrate .. //depot/projects/ia64/contrib/isc-dhcp/includes/cf/freebsd.h#4 integrate .. //depot/projects/ia64/etc/mtree/BSD.root.dist#8 integrate .. //depot/projects/ia64/etc/rc.d/Makefile#17 integrate .. //depot/projects/ia64/etc/rc.d/NETWORKING#5 integrate .. //depot/projects/ia64/etc/rc.d/atm2.sh#5 integrate .. //depot/projects/ia64/etc/rc.d/dhclient#6 integrate .. //depot/projects/ia64/etc/rc.d/ip6fw#3 integrate .. //depot/projects/ia64/etc/rc.d/mrouted#5 integrate .. //depot/projects/ia64/etc/rc.d/netif#2 integrate .. //depot/projects/ia64/etc/rc.d/netoptions#2 integrate .. //depot/projects/ia64/etc/rc.d/network2#4 integrate .. //depot/projects/ia64/etc/rc.d/network3#5 integrate .. //depot/projects/ia64/etc/rc.d/network_ipv6#6 integrate .. //depot/projects/ia64/etc/rc.d/routed#6 integrate .. //depot/projects/ia64/etc/rc.d/routing#2 integrate .. //depot/projects/ia64/include/paths.h#11 integrate .. //depot/projects/ia64/include/unistd.h#17 integrate .. //depot/projects/ia64/lib/libc/gen/exec.3#5 integrate .. //depot/projects/ia64/lib/libc/gen/exec.c#5 integrate .. //depot/projects/ia64/lib/libc/gen/fmtcheck.c#4 integrate .. //depot/projects/ia64/lib/libthr/arch/i386/i386/_setcurthread.c#7 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_init.c#7 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_kern.c#7 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_private.h#7 integrate .. //depot/projects/ia64/lib/libthr/thread/thr_spinlock.c#4 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml#2 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#58 integrate .. //depot/projects/ia64/rescue/Makefile#1 branch .. //depot/projects/ia64/rescue/README#1 branch .. //depot/projects/ia64/rescue/librescue/Makefile#1 branch .. //depot/projects/ia64/rescue/rescue/Makefile#1 branch .. //depot/projects/ia64/sbin/dhclient/Makefile#5 integrate .. //depot/projects/ia64/sbin/dhclient/client/Makefile#2 integrate .. //depot/projects/ia64/sbin/fsck/fsck.c#10 integrate .. //depot/projects/ia64/sbin/fsck/pathnames.h#2 delete .. //depot/projects/ia64/sbin/mdmfs/mdmfs.c#7 integrate .. //depot/projects/ia64/sbin/mdmfs/pathnames.h#3 delete .. //depot/projects/ia64/sbin/mount/mount.c#9 integrate .. //depot/projects/ia64/sbin/mount/pathnames.h#2 integrate .. //depot/projects/ia64/share/man/man4/aac.4#4 integrate .. //depot/projects/ia64/share/man/man4/aha.4#2 integrate .. //depot/projects/ia64/share/man/man4/ahb.4#2 integrate .. //depot/projects/ia64/share/man/man4/ahc.4#4 integrate .. //depot/projects/ia64/share/man/man4/atkbd.4#3 integrate .. //depot/projects/ia64/share/man/man4/awi.4#3 integrate .. //depot/projects/ia64/share/man/man4/bktr.4#4 integrate .. //depot/projects/ia64/share/man/man4/blackhole.4#3 integrate .. //depot/projects/ia64/share/man/man4/bpf.4#5 integrate .. //depot/projects/ia64/share/man/man4/bt.4#2 integrate .. //depot/projects/ia64/share/man/man4/cd.4#4 integrate .. //depot/projects/ia64/share/man/man4/ch.4#3 integrate .. //depot/projects/ia64/share/man/man4/da.4#5 integrate .. //depot/projects/ia64/share/man/man4/ddb.4#4 integrate .. //depot/projects/ia64/share/man/man4/divert.4#3 integrate .. //depot/projects/ia64/share/man/man4/fpa.4#3 integrate .. //depot/projects/ia64/share/man/man4/icmp.4#3 integrate .. //depot/projects/ia64/share/man/man4/ifmib.4#4 integrate .. //depot/projects/ia64/share/man/man4/inet.4#4 integrate .. //depot/projects/ia64/share/man/man4/intro.4#7 integrate .. //depot/projects/ia64/share/man/man4/ip6.4#3 integrate .. //depot/projects/ia64/share/man/man4/kld.4#4 integrate .. //depot/projects/ia64/share/man/man4/lp.4#2 integrate .. //depot/projects/ia64/share/man/man4/lpt.4#2 integrate .. //depot/projects/ia64/share/man/man4/man4.i386/pae.4#4 integrate .. //depot/projects/ia64/share/man/man4/matcd.4#2 integrate .. //depot/projects/ia64/share/man/man4/mem.4#3 integrate .. //depot/projects/ia64/share/man/man4/mtio.4#3 integrate .. //depot/projects/ia64/share/man/man4/natm.4#5 integrate .. //depot/projects/ia64/share/man/man4/netgraph.4#4 integrate .. //depot/projects/ia64/share/man/man4/netintro.4#6 integrate .. //depot/projects/ia64/share/man/man4/ng_ksocket.4#3 integrate .. //depot/projects/ia64/share/man/man4/ng_l2cap.4#5 integrate .. //depot/projects/ia64/share/man/man4/ng_ppp.4#2 integrate .. //depot/projects/ia64/share/man/man4/ng_pppoe.4#4 integrate .. //depot/projects/ia64/share/man/man4/ng_socket.4#2 integrate .. //depot/projects/ia64/share/man/man4/ng_vjc.4#2 integrate .. //depot/projects/ia64/share/man/man4/pass.4#2 integrate .. //depot/projects/ia64/share/man/man4/pci.4#3 integrate .. //depot/projects/ia64/share/man/man4/pcm.4#5 integrate .. //depot/projects/ia64/share/man/man4/polling.4#6 integrate .. //depot/projects/ia64/share/man/man4/ppi.4#2 integrate .. //depot/projects/ia64/share/man/man4/ppp.4#3 integrate .. //depot/projects/ia64/share/man/man4/psm.4#4 integrate .. //depot/projects/ia64/share/man/man4/pt.4#2 integrate .. //depot/projects/ia64/share/man/man4/pty.4#2 integrate .. //depot/projects/ia64/share/man/man4/route.4#4 integrate .. //depot/projects/ia64/share/man/man4/sa.4#2 integrate .. //depot/projects/ia64/share/man/man4/scsi.4#2 integrate .. //depot/projects/ia64/share/man/man4/si.4#2 integrate .. //depot/projects/ia64/share/man/man4/sio.4#7 integrate .. //depot/projects/ia64/share/man/man4/sl.4#2 integrate .. //depot/projects/ia64/share/man/man4/smp.4#5 integrate .. //depot/projects/ia64/share/man/man4/syncer.4#4 integrate .. //depot/projects/ia64/share/man/man4/sysmouse.4#2 integrate .. //depot/projects/ia64/share/man/man4/termios.4#3 integrate .. //depot/projects/ia64/share/man/man4/ti.4#5 integrate .. //depot/projects/ia64/share/man/man4/ttcp.4#2 integrate .. //depot/projects/ia64/share/man/man4/tty.4#2 integrate .. //depot/projects/ia64/share/man/man4/udp.4#2 integrate .. //depot/projects/ia64/share/mk/bsd.lib.mk#21 integrate .. //depot/projects/ia64/share/mk/bsd.prog.mk#17 integrate .. //depot/projects/ia64/sys/alpha/alpha/support.s#7 integrate .. //depot/projects/ia64/sys/fs/msdosfs/msdosfs_vfsops.c#18 integrate .. //depot/projects/ia64/sys/ia64/ia64/pmap.c#68 integrate .. //depot/projects/ia64/sys/pci/if_rl.c#33 integrate .. //depot/projects/ia64/sys/pci/if_xl.c#33 integrate .. //depot/projects/ia64/sys/powerpc/powermac/macio.c#9 integrate .. //depot/projects/ia64/sys/sys/param.h#36 integrate Differences ... ==== //depot/projects/ia64/bin/csh/Makefile#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/bin/csh/Makefile,v 1.32 2003/06/13 07:04:01 markm Exp $ +# $FreeBSD: src/bin/csh/Makefile,v 1.33 2003/06/29 18:46:17 gordon Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # # C Shell with process control; VM/UNIX VAX Makefile @@ -10,7 +10,11 @@ .PATH: ${TCSHDIR} PROG= csh +.if defined(RESCUE) +DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG}"' +.else DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' +.endif CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} WARNS= 2 SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ ==== //depot/projects/ia64/bin/ed/Makefile#7 (text+ko) ==== @@ -1,11 +1,11 @@ -# $FreeBSD: src/bin/ed/Makefile,v 1.25 2003/06/13 07:04:01 markm Exp $ +# $FreeBSD: src/bin/ed/Makefile,v 1.26 2003/06/29 10:03:35 ru Exp $ PROG= ed SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c LINKS= ${BINDIR}/ed ${BINDIR}/red MLINKS= ed.1 red.1 -.if exists(${.CURDIR}/../../crypto) && !defined(NO_OPENSSL) +.if exists(${.CURDIR}/../../crypto) && !defined(NOCRYPT) && !defined(NO_OPENSSL) DISTRIBUTION=crypto CFLAGS+=-DDES WARNS= 2 ==== //depot/projects/ia64/contrib/isc-dhcp/includes/cf/freebsd.h#4 (text+ko) ==== @@ -40,7 +40,7 @@ * see ``http://www.vix.com''. To learn more about Nominum, Inc., see * ``http://www.nominum.com''. * - * $FreeBSD: src/contrib/isc-dhcp/includes/cf/freebsd.h,v 1.5 2002/09/30 08:45:34 murray Exp $ + * $FreeBSD: src/contrib/isc-dhcp/includes/cf/freebsd.h,v 1.6 2003/06/29 18:46:17 gordon Exp $ */ #include @@ -103,6 +103,10 @@ #define SOCKLEN_T int #endif +#ifdef RESCUE +#define _PATH_DHCLIENT_SCRIPT "/rescue/dhclient-script" +#endif + #if defined (USE_DEFAULT_NETWORK) # define USE_BPF #endif @@ -113,6 +117,9 @@ #endif /* HAVE_DEV_RANDOM */ const char *cmds[] = { +#ifndef RESCUE + /* rescue environment can't rely on these ... */ + /* Actually, /sbin/dhclient shouldn't use these, either. */ "/bin/ps -axlw 2>&1", "/usr/sbin/arp -an 2>&1", "/usr/bin/netstat -an 2>&1", @@ -123,10 +130,12 @@ "/usr/sbin/iostat 2>&1", "/usr/bin/vmstat 2>&1", "/usr/bin/w 2>&1", +#endif NULL }; const char *dirs[] = { +#ifndef RESCUE "/tmp", "/usr/tmp", ".", @@ -136,13 +145,16 @@ "/var/mail", "/home", "/usr/home", +#endif NULL }; const char *files[] = { +#ifndef RESCUE "/var/log/messages", "/var/log/wtmp", "/var/log/lastlog", +#endif NULL }; #endif /* NEED_PRAND_CONF */ ==== //depot/projects/ia64/etc/mtree/BSD.root.dist#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.root.dist,v 1.62 2003/03/11 11:14:34 ru Exp $ +# $FreeBSD: src/etc/mtree/BSD.root.dist,v 1.63 2003/06/29 18:35:36 gordon Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -63,6 +63,8 @@ .. proc mode=0555 .. + rescue + .. root .. sbin ==== //depot/projects/ia64/etc/rc.d/Makefile#17 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.19 2003/06/26 09:50:51 smkelly Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.20 2003/06/29 05:15:57 mtm Exp $ .include @@ -12,10 +12,10 @@ ldconfig local localdaemons lomac lpd \ motd mountcritlocal mountcritremote \ mountd moused mroute6d mrouted msgs \ - named netif network1 network2 network3 \ + named netif netoptions 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 \ + rarpd rcconf.sh root route6d routed routing rpcbind rtadvd rwho savecore \ securelevel sendmail serial sppp sshd swap1 syscons sysctl \ syslogd timed ttys usbd vinum virecover watchdogd ypbind \ yppasswdd ypserv ypset ypupdated ypxfrd ==== //depot/projects/ia64/etc/rc.d/NETWORKING#5 (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.5 2003/04/18 17:55:05 mtm Exp $ +# $FreeBSD: src/etc/rc.d/NETWORKING,v 1.6 2003/06/29 05:15:57 mtm Exp $ # # PROVIDE: NETWORKING NETWORK -# REQUIRE: network dhclient altqd netif network2 network_ipv6 isdnd ppp-user +# REQUIRE: network dhclient altqd netif routing network_ipv6 isdnd ppp-user # REQUIRE: routed mrouted route6d mroute6d # KEYWORD: FreeBSD NetBSD ==== //depot/projects/ia64/etc/rc.d/atm2.sh#5 (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/atm2.sh,v 1.12 2003/04/18 17:55:05 mtm Exp $ +# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.13 2003/06/29 05:15:57 mtm Exp $ # # PROVIDE: atm2 # REQUIRE: atm1 netif -# BEFORE: network2 +# BEFORE: routing # KEYWORD: FreeBSD # ==== //depot/projects/ia64/etc/rc.d/dhclient#6 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/dhclient,v 1.5 2003/06/07 10:31:17 mtm Exp $ +# $FreeBSD: src/etc/rc.d/dhclient,v 1.6 2003/06/29 05:34:41 mtm Exp $ # # PROVIDE: dhclient @@ -23,6 +23,9 @@ rcvar= start_precmd="dhclient_prestart" start_postcmd="dhclient_poststart" + stop_cmd="dhclient_stop" + stop_precmd="dhclient_prestop" + stop_postcmd="dhclient_poststop" ;; NetBSD) rcvar=$name @@ -30,29 +33,81 @@ ;; esac -dhclient_prestart() +dhclient_common() { dhcp_list="`list_net_interfaces dhcp`" if [ -z "$dhcp_list" ]; then return 1 fi - for ifn in ${dhcp_list}; do + # Determine the scope of the command + # + _cooked_list="$dhcp_list" + if [ -n "$_cmdifn" ]; then + eval _cooked_list=\"`expr "$dhcp_list" : ".*\($_cmdifn\).*"`\" + if [ -z "$_cooked_list" ]; then + err "No such network interface: $_cmdifn" + return 1 + fi + fi +} + +dhclient_prestart() +{ + dhclient_common || return 1 + + for ifn in ${_cooked_list}; do ifscript_up ${ifn} done - rc_flags="${rc_flags} ${dhcp_list}" + rc_flags="${rc_flags} ${_cooked_list}" return 0 } dhclient_poststart() { - for ifn in ${dhcp_list}; do + for ifn in ${_cooked_list}; do ifalias_up ${ifn} ipx_up ${ifn} ifconfig ${ifn} done } +dhclient_stop() +{ + echo -n "Releasing DHCP leases:" + for ifn in $_cooked_list ; do + ${command} -r $ifn + if [ $? -eq 0 ]; then + echo -n " $ifn" + else + _fail="$_fail $ifn" + fi + done + echo '.' + debug "The following leases failed to release: $_fail" +} + +dhclient_prestop() +{ + dhclient_common || return 1 + + for ifn in ${_cooked_list}; do + ipx_down ${ifn} + ifalias_down ${ifn} + done +} + +dhclient_poststop() +{ + for ifn in ${_cooked_list}; do + ifscript_down ${ifn} + done +} + +if [ -n "$2" ]; then + _cmdifn="$2" +fi + load_rc_config $name run_rc_command "$1" ==== //depot/projects/ia64/etc/rc.d/ip6fw#3 (text+ko) ==== @@ -1,10 +1,10 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ip6fw,v 1.2 2002/10/12 10:31:31 schweikh Exp $ +# $FreeBSD: src/etc/rc.d/ip6fw,v 1.3 2003/06/29 05:15:57 mtm Exp $ # # PROVIDE: ip6fw -# REQUIRE: network2 +# REQUIRE: routing # BEFORE: network_ipv6 # KEYWORD: FreeBSD ==== //depot/projects/ia64/etc/rc.d/mrouted#5 (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.4 2003/04/18 17:55:05 mtm Exp $ +# $FreeBSD: src/etc/rc.d/mrouted,v 1.5 2003/06/29 05:15:57 mtm Exp $ # # PROVIDE: mrouted -# REQUIRE: netif network2 +# REQUIRE: netif routing # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/netif#2 (text+ko) ==== @@ -22,7 +22,7 @@ # (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/rc.d/netif,v 1.1 2003/04/18 17:51:54 mtm Exp $ +# $FreeBSD: src/etc/rc.d/netif,v 1.2 2003/06/29 05:34:41 mtm Exp $ # # PROVIDE: netif @@ -38,52 +38,129 @@ cloneup_cmd="clone_up" clonedown_cmd="clone_down" extra_commands="cloneup clonedown" +_cmdifn= network_start() { - # Create cloned interfaces - clone_up + if [ -z "$_cmdifn" ]; then + # + # We're operating as a general network start routine. + # + + # Create cloned interfaces + clone_up + + # Create IPv6<-->IPv4 tunnels + gif_up + fi + + # Configure the interface(s). + network_common ifn_start verbose + + # Resync ipfilter + /etc/rc.d/ipfilter resync +} + +network_stop() +{ + echo -n "Stopping network:" + + # Deconfigure the interface(s) + network_common ifn_stop + echo '.' +} + +# network_common routine verbose +# Common configuration subroutine for network interfaces. This +# routine takes all the preparatory steps needed for configuriing +# an interface and then calls $routine. If $verbose is specified, +# it will call ifconfig(8) to show, in long format, the configured +# interfaces. If $verbose is not given, it will simply output the +# configured interface(s). +network_common() +{ + _func= + _verbose= - # Create IPv6<-->IPv4 tunnels - gif_up + if [ -z "$1" ]; then + err "network_common(): No function name specified." + else + _func="$1" + fi + [ -n "$2" ] && _verbose=yes # Get a list of network interfaces. Do not include dhcp interfaces. _ifn_list="`list_net_interfaces nodhcp`" - # Setup the supplied network interfaces including startup - # scripts, if they exist. + # Set the scope of the command (all interfaces or just one). # - for ifn in ${_ifn_list}; do - ifscript_up ${ifn} && eval showstat_$ifn=1 + _cooked_list="$_ifn_list" + if [ -n "$_cmdifn" ]; then + eval _cooked_list=\"`expr "$_ifn_list" : ".*\($_cmdifn\).*"`\" + if [ -z "$_cooked_list" ]; then + err "No such network interface: $_cmdifn" + return 1 + fi + fi - ifconfig_up ${ifn} && eval showstat_$ifn=1 - - ifalias_up ${ifn} && eval showstat_$ifn=1 - - ipx_up ${ifn} && eval showstat_$ifn=1 + for ifn in ${_cooked_list}; do + if ${_func} ${ifn} ; then + eval showstat_$ifn=1 + else + _fail="$_fail $ifn" + fi done # Display interfaces configured by this script # - for ifn in ${_ifn_list}; do + for ifn in ${_cooked_list}; do eval showstat=\$showstat_${ifn} if [ ! -z ${showstat} ]; then - ifconfig ${ifn} + if [ -n "$_verbose" ]; then + ifconfig ${ifn} + else + echo -n " ${ifn}" + fi fi done + debug "The following interfaces were not configured: $_fail" +} - # Resync ipfilter - /etc/rc.d/ipfilter resync +ifn_start() +{ + local ifn cfg + ifn="$1" + cfg=1 + + [ -z "$ifn" ] && return 1 + + ifscript_up ${ifn} && cfg=0 + ifconfig_up ${ifn} && cfg=0 + ifalias_up ${ifn} && cfg=0 + ipx_up ${ifn} && cfg=0 + + return $cfg } -network_stop() +ifn_stop() { - echo -n "Stopping network:" + local ifn cfg + ifn="$1" + cfg=1 + + [ -z "$ifn" ] && return 1 + + ipx_down ${ifn} && cfg=0 + ifalias_down ${ifn} && cfg=0 + ifconfig_down ${ifn} && cfg=0 + ifscript_down ${ifn} && cfg=0 - # flush routes - route -n flush - echo '.' + return $cfg } +if [ -n "$2" ]; then + _cmdifn="$2" +fi + load_rc_config $name run_rc_command "$1" ==== //depot/projects/ia64/etc/rc.d/netoptions#2 (text+ko) ==== @@ -1,9 +1,9 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/netoptions,v 1.137 2003/05/05 15:38:41 mtm Exp $ +# $FreeBSD: src/etc/rc.d/netoptions,v 1.138 2003/06/29 05:09:48 mtm Exp $ # -# PROVIDE: network3 +# PROVIDE: netoptions # REQUIRE: localdaemons # BEFORE: securelevel # KEYWORD: FreeBSD ==== //depot/projects/ia64/etc/rc.d/network2#4 (text+ko) ==== @@ -2,12 +2,12 @@ # # Configure routing and miscellaneous network tunables # -# $FreeBSD: src/etc/rc.d/network2,v 1.136 2003/04/18 17:55:05 mtm Exp $ +# $FreeBSD: src/etc/rc.d/network2,v 1.137 2003/06/29 05:15:57 mtm Exp $ # # PROVIDE: network2 # REQUIRE: netif ppp-user -# KEYWORD: FreeBSD +# KEYWORD: FreeBSD nostart . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/network3#5 (text+ko) ==== @@ -1,12 +1,12 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/network3,v 1.137 2003/05/05 15:38:41 mtm Exp $ +# $FreeBSD: src/etc/rc.d/network3,v 1.138 2003/06/29 05:15:57 mtm Exp $ # # PROVIDE: network3 # REQUIRE: localdaemons # BEFORE: securelevel -# KEYWORD: FreeBSD +# KEYWORD: FreeBSD nostart . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/network_ipv6#6 (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/network_ipv6,v 1.34 2003/05/12 11:36:50 ume Exp $ +# $FreeBSD: src/etc/rc.d/network_ipv6,v 1.35 2003/06/29 05:15:57 mtm Exp $ # From: src/etc/rc.network6,v 1.29 2002/04/06 15:15:43 # # PROVIDE: network_ipv6 -# REQUIRE: network2 +# REQUIRE: routing # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/routed#6 (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.5 2003/04/18 17:55:05 mtm Exp $ +# $FreeBSD: src/etc/rc.d/routed,v 1.6 2003/06/29 05:15:57 mtm Exp $ # # PROVIDE: routed -# REQUIRE: netif network2 +# REQUIRE: netif routing # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/routing#2 (text+ko) ==== @@ -2,20 +2,34 @@ # # Configure routing and miscellaneous network tunables # -# $FreeBSD: src/etc/rc.d/routing,v 1.136 2003/04/18 17:55:05 mtm Exp $ +# $FreeBSD: src/etc/rc.d/routing,v 1.138 2003/06/29 17:59:09 mtm Exp $ # -# PROVIDE: network2 +# PROVIDE: routing # REQUIRE: netif ppp-user # KEYWORD: FreeBSD . /etc/rc.subr -name="network2" -start_cmd="network2_start" -stop_cmd=":" +name="routing" +start_cmd="routing_start" +stop_cmd="routing_stop" +extra_commands="options static" +static_cmd="static_start" +options_cmd="options_start" + +routing_start() +{ + static_start + options_start +} + +routing_stop() +{ + route -n flush +} -network2_start() +static_start() { case ${defaultrouter} in [Nn][Oo] | '') @@ -34,7 +48,10 @@ route add ${route_args} done fi +} +options_start() +{ echo -n 'Additional routing options:' case ${tcp_extensions} in [Yy][Ee][Ss] | '') ==== //depot/projects/ia64/include/paths.h#11 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)paths.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: src/include/paths.h,v 1.21 2003/06/25 22:28:33 phantom Exp $ + * $FreeBSD: src/include/paths.h,v 1.24 2003/06/29 18:35:36 gordon Exp $ */ #ifndef _PATHS_H_ @@ -44,6 +44,9 @@ /* All standard utilities path. */ #define _PATH_STDPATH \ "/usr/bin:/bin:/usr/sbin:/sbin:" +/* Locate system binaries */ +#define _PATH_SYSPATH \ + "/sbin:/usr/sbin" #define _PATH_AUTHCONF "/etc/auth.conf" #define _PATH_BSHELL "/bin/sh" @@ -66,7 +69,10 @@ #define _PATH_LOGIN "/usr/bin/login" #define _PATH_MAILDIR "/var/mail" #define _PATH_MAN "/usr/share/man" +#define _PATH_MDCONFIG "/sbin/mdconfig" #define _PATH_MEM "/dev/mem" +#define _PATH_MOUNT "/sbin/mount" +#define _PATH_NEWFS "/sbin/newfs" #define _PATH_NOLOGIN "/var/run/nologin" #define _PATH_RCP "/bin/rcp" #define _PATH_REBOOT "/sbin/reboot" @@ -94,4 +100,39 @@ const char *getbootfile(void); __END_DECLS +#ifdef RESCUE +#undef _PATH_DEFPATH +#define _PATH_DEFPATH "/rescue:/usr/bin:/bin" +#undef _PATH_STDPATH +#define _PATH_STDPATH "/rescue:/usr/bin:/bin:/usr/sbin:/sbin" +#undef _PATH_SYSPATH +#define _PATH_SYSPATH "/rescue:/sbin:/usr/sbin" +#undef _PATH_BSHELL +#define _PATH_BSHELL "/rescue/sh" +#undef _PATH_CP +#define _PATH_CP "/rescue/cp" +#undef _PATH_CSHELL +#define _PATH_CSHELL "/rescue/csh" +#undef _PATH_HALT +#define _PATH_HALT "/rescue/halt" +#undef _PATH_IFCONFIG +#define _PATH_IFCONFIG "/rescue/ifconfig" +#undef _PATH_MDCONFIG +#define _PATH_MDCONFIG "/rescue/mdconfig" +#undef _PATH_MOUNT +#define _PATH_MOUNT "/rescue/mount" +#undef _PATH_NEWFS +#define _PATH_NEWFS "/rescue/newfs" +#undef _PATH_RCP +#define _PATH_RCP "/rescue/rcp" +#undef _PATH_REBOOT +#define _PATH_REBOOT "/rescue/reboot" +#undef _PATH_RM +#define _PATH_RM "/rescue/rm" +#undef _PATH_VI +#define _PATH_VI "/rescue/vi" +#undef _PATH_WALL +#define _PATH_WALL "/rescue/wall" +#endif /* RESCUE */ + #endif /* !_PATHS_H_ */ ==== //depot/projects/ia64/include/unistd.h#17 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)unistd.h 8.12 (Berkeley) 4/27/95 - * $FreeBSD: src/include/unistd.h,v 1.66 2002/12/29 01:07:55 mike Exp $ + * $FreeBSD: src/include/unistd.h,v 1.67 2003/06/29 17:33:34 gordon Exp $ */ #ifndef _UNISTD_H_ @@ -335,6 +335,7 @@ int execv(const char *, char * const *); int execve(const char *, char * const *, char * const *); int execvp(const char *, char * const *); +int execvP(const char *, const char *, char * const *); pid_t fork(void); long fpathconf(int, int); char *getcwd(char *, size_t); ==== //depot/projects/ia64/lib/libc/gen/exec.3#5 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)exec.3 8.3 (Berkeley) 1/24/94 -.\" $FreeBSD: src/lib/libc/gen/exec.3,v 1.20 2003/06/18 15:24:21 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/exec.3,v 1.21 2003/06/29 17:33:34 gordon Exp $ .\" .Dd January 24, 1994 .Dt EXEC 3 @@ -41,7 +41,8 @@ .Nm execle , .Nm exect , .Nm execv , -.Nm execvp +.Nm execvp , +.Nm execvP .Nd execute a file .Sh LIBRARY .Lb libc @@ -60,6 +61,8 @@ .Fn execv "const char *path" "char *const argv[]" .Ft int .Fn execvp "const char *file" "char *const argv[]" +.Ft int +.Fn execvP "const char *file" "const char *search_path" "char *const argv[]" .Sh DESCRIPTION The .Nm exec @@ -99,8 +102,9 @@ The .Fn exect , .Fn execv , +.Fn execvp , and -.Fn execvp +.Fn execvP functions provide an array of pointers to null-terminated strings that represent the argument list available to the new program. The first argument, by convention, should point to the file name associated @@ -134,14 +138,19 @@ Some of these functions have special semantics. .Pp The functions -.Fn execlp +.Fn execlp , +.Fn execvp , and -.Fn execvp +.Fn execvP will duplicate the actions of the shell in searching for an executable file if the specified file name does not contain a slash .Dq Li / character. -The search path is the path specified in the environment by +For +.Fn execlp +and +.Fn execvp , +search path is the path specified in the environment by .Dq Ev PATH variable. If this variable isn't specified, @@ -151,6 +160,9 @@ .Aq paths.h , which is set to .Dq Ev /usr/bin:/bin . +For +.Fn execvP , +the search path is specified as an argument to the function. In addition, certain errors are treated specially. .Pp If an error is ambiguous (for simplicity, we shall consider all @@ -206,9 +218,10 @@ The .Fn execl , .Fn execle , -.Fn execlp +.Fn execlp , +.Fn execvp and -.Fn execvp +.Fn execvP functions may fail and set .Va errno @@ -300,3 +313,7 @@ functions conform to .St -p1003.1-88 . +The +.Fn execvP +function first appeared in +.Fx 5.2 . ==== //depot/projects/ia64/lib/libc/gen/exec.c#5 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/exec.c,v 1.20 2003/01/03 23:16:55 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/exec.c,v 1.21 2003/06/29 17:33:34 gordon Exp $"); #include "namespace.h" #include @@ -142,15 +142,27 @@ } int -execvp(name, argv) +execvp(const char *name, char *const *argv) +{ + const char *path; + + /* Get the path we're searching. */ + if (!(path = getenv("PATH"))) + path = _PATH_DEFPATH; + return(execvP(name,path,argv)); +} + +int +execvP(name, path, argv) const char *name; + const char *path; char * const *argv; { char **memp; int cnt, lp, ln; char *p; int eacces, save_errno; - char *bp, *cur, *path, buf[MAXPATHLEN]; + char *bp, *cur, buf[MAXPATHLEN]; struct stat sb; eacces = 0; @@ -158,7 +170,7 @@ /* If it's an absolute or relative path name, it's easy. */ if (index(name, '/')) { bp = (char *)name; - cur = path = NULL; + cur = NULL; goto retry; } bp = buf; @@ -169,16 +181,12 @@ return (-1); } - /* Get the path we're searching. */ - if (!(path = getenv("PATH"))) - path = _PATH_DEFPATH; cur = alloca(strlen(path) + 1); if (cur == NULL) { errno = ENOMEM; return (-1); } strcpy(cur, path); - path = cur; while ( (p = strsep(&cur, ":")) ) { /* * It's a SHELL path -- double, leading and trailing colons @@ -197,7 +205,7 @@ * the user may execute the wrong program. >>> TRUNCATED FOR MAIL (1000 lines) <<<