Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jul 1999 00:15:11 +0200
From:      "Julian Stacey" <jhs@jhs.muc.de>
To:        obrien@FreeBSD.ORG
Cc:        freebsd-mobile@FreeBSD.ORG, jkh@FreeBSD.ORG
Subject:   Re: pccardd patches for review 
Message-ID:  <199907212215.WAA08791@jhs.muc.de>
In-Reply-To: Your message of "Tue, 20 Jul 1999 01:50:15 PDT." <19990720015015.C30371@nuxi.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
"David O'Brien" wrote:
> > I've spent some time hacking pccardd to not have that frustrating
> > delay in it, 
> One thing we really need is a way to make pccardd to not daemonize
> (regardless of the delay) until it has initialized any Ethernet cards.
> Otherwise Jordan's new DHCP support in sysinstall will not work well on
> laptops.
> Right now laptops have to be special cased since the Ethernet devices
> isn't registered until well after rc.network is run.

> From: Greg Lehey <grog@lemis.com>
> That's not the only problem with the current situation.  xntpd, rwhod
> and nfs mounts also fail in strange ways.

Yes, (BTW amd fails rather than than nfs itself),  As I recently sent:

> cc:             freebsd-mobile@FreeBSD.ORG
> A guess (I haven't had time to look at src/ to check):
>         perhaps quick dieing processes that use UDP fail,
>         & more persistent users of TCP survive ?
> ...
> BTW Without my rc.local cludge, Of processes listed in network_pass3:
>         I saw not running:      amd rwhod
>         I saw running:          nfsd nfsiod mountd rpc.statd
>         I have not tried:       rpc.lockd kadmind natd
> Of processes listed in network_pass2:
>         I saw not running:      timed named
>         I saw running:          portmap
>         I have not tried:       keyserv ntpdate rpc.yppasswd rpc.ypupdated
>                                 rpc.ypxfrd xntpd ypbind ypserv


Here Are Diffs, (also sent as a send-pr)
against 3.2-RELEASE (non PAO), as running on my desktops & laptop,
for /etc/{defaults/rc.conf pccard_ether rc.network}, (also for curren).
A few more daemons may need to later be moved within "if [" as
I don't use, so havent tested EG mrouted rpc.ypxfrd.

PS
To keep the diffs minimal & readable, I avoided indenting for my new if's, 
The start sequence for different daemons remains clearly visible, as I
I avoided splitting the 3 procedures in rc.network into sub procedures, for
desktop & laptop.

-------------
*** 3.2-RELEASE/etc/defaults/rc.conf	Mon Feb 15 11:45:33 1999
--- new-jhs/etc/defaults/rc.conf	Wed Jul 21 18:01:07 1999
***************
*** 20,25 ****
--- 20,36 ----
  pccard_enable="NO"	# Set to YES if you want to configure PCCARD devices.
  pccard_mem="DEFAULT"	# If pccard_enable=YES, this is card memory address.
  pccard_ifconfig="NO"	# Specialized pccard ethernet configuration (or NO).
+ 			# In addition to 3.2-RELEASE function in 
+ 			#	/etc/pccard_ether
+ 			# the following extra notes now apply:
+ 			# Typically one of:
+ 			#	"DHCP"
+ 			#	"host.domain -link0 link1 -link2"
+ 			# If not "NO", assume a pcmcia ethernet,
+ 			# with slow recognition of card by pccardd, 
+ 			# where some rc.network processes (EG timed amd rwhod
+ 			# (perhaps UDP based ?)) would otherwise die,
+ 			# so they are now called via /etc/pccard.conf "insert"
  local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"	# startup script dirs.
  local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic" # periodic script dirs
  rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
*** 3.2-RELEASE/etc/pccard_ether	Sat Jun 19 23:18:13 1999
--- new-jhs/etc/pccard_ether	Wed Jul 21 19:24:51 1999
***************
*** 53,55 ****
--- 53,63 ----
  		route add ${route_args}
  	done
  fi
+ 
+ if [ "x$pccard_ifconfig" != "xNO" ] ; then	#{
+ 	if [ -f /etc/rc.network ]; then
+ 		. /etc/rc.network
+ 	fi
+         network_pass2 pccard_supplementary	# xntpd, timed
+         network_pass3 pccard_supplementary	# amd, rwhod
+ fi						#}
*** 3.2-RELEASE/etc/rc.network	Mon Feb 15 11:45:33 1999
--- new-jhs/etc/rc.network	Wed Jul 21 19:29:47 1999
***************
*** 194,199 ****
--- 194,201 ----
  
  network_pass2() {
      echo -n 'Doing additional network setup:'
+ if [ "X$1" != "X"pccard_supplementary ]; then	#{
+     # Non laptop, or laptop not on supplementary pass.
      if [ "X${named_enable}" = X"YES" ]; then
  	    echo -n ' named';		${named_program-"named"} ${named_flags}
      fi
***************
*** 201,206 ****
--- 203,213 ----
      if [ "X${ntpdate_enable}" = X"YES" ]; then
  	    echo -n ' ntpdate';	${ntpdate_program} ${ntpdate_flags} >/dev/null 2>&1
      fi
+ fi						#}
+ 
+ if [ \( "X${pccard_ifconfig}" = X"NO" \) -o \
+ 	\( "X$1" = "X"pccard_supplementary \) ]; then	#{
+     # Non laptop, or laptop on supplementary pccard pass.
  
      if [ "X${xntpd_enable}" = X"YES" ]; then
  	    echo -n ' xntpd';	${xntpd_program} ${xntpd_flags}
***************
*** 209,215 ****
--- 216,225 ----
      if [ "X${timed_enable}" = X"YES" ]; then
  	    echo -n ' timed';		timed ${timed_flags}
      fi
+ fi 							#}
  
+ if [ "X$1" != "X"pccard_supplementary ]; then	#{
+     # Non laptop, or laptop not yet on supplementary pass.
      if [ "X${portmap_enable}" = X"YES" ]; then
  	    echo -n ' portmap';		portmap ${portmap_flags}
      fi
***************
*** 249,262 ****
--- 259,276 ----
      if [ -n "${atm_pass2_done}" ]; then
  	    atm_pass3
      fi
+ fi						#}
  
      echo '.'
      network_pass2_done=YES
  }
  
+ 
  network_pass3() {
      echo -n 'Starting final network daemons:'
  
+ if [ "X$1" != "X"pccard_supplementary ]; then	#{
+     # Non laptop, or laptop not yet on supplementary pass.
      if [ "X${nfs_server_enable}" = X"YES" -a -r /etc/exports ]; then
  	    echo -n ' mountd'
  	    if [ "X${weak_mountd_authentication}" = X"YES" ]; then
***************
*** 282,288 ****
--- 296,306 ----
  			>/dev/null 2>&1
  	    fi
      fi
+ fi						#}
  
+ if [ \( "X${pccard_ifconfig}" = X"NO" \) -o \
+ 	\( "X$1" = "X"pccard_supplementary \) ]; then	#{
+     # Non laptop, or laptop on supplementary pccard pass.
      if [ "X${amd_enable}" = X"YES" ]; then
  	    echo -n ' amd'
  	    if [ "X${amd_map_program}" != X"NO" ]; then
***************
*** 294,300 ****
--- 312,321 ----
      if [ "X${rwhod_enable}" = X"YES" ]; then
  	    echo -n ' rwhod';	rwhod ${rwhod_flags}
      fi
+ fi							#}
  
+ if [ "X$1" != "X"pccard_supplementary ]; then		#{
+     # Non laptop, or laptop not yet on supplementary pass.
      # Kerberos runs ONLY on the Kerberos server machine
      if [ "X${kerberos_server_enable}" = X"YES" ]; then
  	    if [ "X${kerberos_stash}" = "XYES" ]; then
***************
*** 323,328 ****
--- 344,350 ----
                 echo -n ' natd'; natd ${natd_flags} ${natd_ifarg}
         fi
  
+ fi							#}
      echo '.'
      network_pass3_done=YES
  }
-------------
Extra patches to run against current 
	(version as of ctm: "Jul 21 18:25 src-cur.3942.gz")
after running the release patches, as 2 Rel. patches break on current.
*** src-cur.3942/etc/rc.conf	Wed Jul 21 22:48:56 1999
--- new-jhs/etc/rc.conf	Wed Jul 21 23:21:34 1999
***************
*** 22,27 ****
--- 22,38 ----
  pccard_enable="NO"	# Set to YES if you want to configure PCCARD devices.
  pccard_mem="DEFAULT"	# If pccard_enable=YES, this is card memory address.
  pccard_ifconfig="NO"	# Specialized pccard ethernet configuration (or NO).
+ 			# In addition to 3.2-RELEASE function in 
+ 			#	/etc/pccard_ether
+ 			# the following extra notes now apply:
+ 			# Typically one of:
+ 			#	"DHCP"
+ 			#	"host.domain -link0 link1 -link2"
+ 			# If not "NO", assume a pcmcia ethernet,
+ 			# with slow recognition of card by pccardd, 
+ 			# where some rc.network processes (EG timed amd rwhod
+ 			# (perhaps UDP based ?)) would otherwise die,
+ 			# so they are now called via /etc/pccard.conf "insert"
  pccardd_flags=""	# Additional flags for pccardd.
  pccard_conf="/etc/pccard.conf.sample"	# pccardd(8) config file
  local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"	# startup script dirs.
*** src-cur.3942/etc/rc.network	Wed Jul 21 22:48:59 1999
--- new-jhs//etc/rc.network	Wed Jul 21 23:25:44 1999
***************
*** 358,363 ****
--- 379,385 ----
  	    fi
  	    unset stash_flag
      fi
+ fi							#}
      
      echo '.'
      network_pass3_done=YES
--------

Julian
Julian H. Stacey				http://www.freebsd.org/~jhs/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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