rc.d startup order

Hello,

From 5x RELEASE as i know, FreeBSD switched to rcorder/rc.subr (from NetBSD?) system which maintance startup script sequence

I get startup sequence in my system:
Code:
rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
/etc/rc.d/dumpon                                                         
/etc/rc.d/ddb                                                            
/etc/rc.d/initrandom                                                     
/etc/rc.d/geli                                                           
/etc/rc.d/gbde                                                           
/etc/rc.d/encswap                                                        
/etc/rc.d/ccd                                                            
/etc/rc.d/swap1                                                          
/etc/rc.d/early.sh                                                       
.....
/etc/rc.d/tmp                                                            
/etc/rc.d/cleartmp                                                       
/usr/local/etc/rc.d/xfs                                                  
/etc/rc.d/accounting                                                     
/etc/rc.d/devfs                                                          
...
/etc/rc.d/virecover                                                      
/usr/local/etc/rc.d/gnugk                                                
/etc/rc.d/DAEMON                                                         
/usr/local/etc/rc.d/svnserve                                             
/usr/local/etc/rc.d/ssyncd.init                                          
/etc/rc.d/apm                                                            
...
/etc/rc.d/motd                                                           
/usr/local/etc/rc.d/fusefs                                               
...
/etc/rc.d/yppasswdd                                                      
/usr/local/etc/rc.d/isc-dhcpd                                            
/usr/local/etc/rc.d/nagios                                               
/usr/local/etc/rc.d/ndo2db                                               
/usr/local/etc/rc.d/npcd                                                 
/usr/local/etc/rc.d/nstatld.sh                                           
/usr/local/etc/rc.d/proftpd                                              
/usr/local/etc/rc.d/samba                                                
/usr/local/etc/rc.d/smartd                                               
/etc/rc.d/LOGIN                                                          
/usr/local/etc/rc.d/squid                                                
/usr/local/etc/rc.d/snmptrapd                                            
/usr/local/etc/rc.d/snmpd                                                
/usr/local/etc/rc.d/slapd                                                
/usr/local/etc/rc.d/slurpd                                               
/usr/local/etc/rc.d/slpd                                                 
/usr/local/etc/rc.d/samhain.sh                                           
/usr/local/etc/rc.d/rsyncd                                               
/usr/local/etc/rc.d/redir                                                
/usr/local/etc/rc.d/postgresql                                           
/usr/local/etc/rc.d/nrpe2                                                
/usr/local/etc/rc.d/nakenchat                                            
/usr/local/etc/rc.d/mysql-server                                         
/usr/local/etc/rc.d/mdnsd                                                
/usr/local/etc/rc.d/kqemu                                                
/usr/local/etc/rc.d/htcacheclean
/usr/local/etc/rc.d/dbus
rcorder: requirement `usbd' in file `/usr/local/etc/rc.d/hald' has no providers.
/usr/local/etc/rc.d/hald
/usr/local/etc/rc.d/ffserver
/etc/rc.d/sshd
/usr/local/etc/rc.d/ezjail.sh
/usr/local/etc/rc.d/cupsd
/usr/local/etc/rc.d/clamav-clamd
/usr/local/etc/rc.d/clamav-freshclam
/usr/local/etc/rc.d/bsdstats.sh
/usr/local/etc/rc.d/bacula-fd
/usr/local/etc/rc.d/avahi-daemon
/usr/local/etc/rc.d/avahi-dnsconfd
/usr/local/etc/rc.d/asterisk
/usr/local/etc/rc.d/arpwatch
/usr/local/etc/rc.d/apache22
/etc/rc.d/ypxfrd
/etc/rc.d/ypupdated
/etc/rc.d/ypset
/etc/rc.d/wpa_supplicant
/etc/rc.d/watchdogd
/etc/rc.d/syscons
/etc/rc.d/sendmail
/etc/rc.d/cron
/etc/rc.d/jail
/etc/rc.d/localpkg
/etc/rc.d/securelevel
/etc/rc.d/power_profile
/etc/rc.d/othermta
/etc/rc.d/natd
/etc/rc.d/msgs
/etc/rc.d/moused
/etc/rc.d/mixer
/etc/rc.d/inetd
/etc/rc.d/idmapd
/etc/rc.d/hostapd
/etc/rc.d/geli2
/etc/rc.d/ftpd
/etc/rc.d/ftp-proxy
/etc/rc.d/dhclient
/etc/rc.d/bsnmpd
/etc/rc.d/bridge
/etc/rc.d/bluetooth
/etc/rc.d/bgfsck

I see that scripts from "/etc/rc.d/" and "/usr/local/etc/rc.d" in some place a interleaving.
Thats correct? Scripts executing by "parallel mode", not order "first /etc/rc.d" and "/usr/local/etc/rc.d" after?
Thanks.
 
Scripts define dependencies that define the order in which they are run. This can be used to start a script from /usr/local/etc/rc.d early in the booting process and it removes the need for prefixes to specify a boot order.
 
I have a question about the order of rc scripts, too. Thank you for pointing me at rcorder. I have already complained about syslogd starting too early before network is up on the stable mailing list, but noone could help me. With the rcorder tool, I can see the following problems:

Code:
[zelda] ~> rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | less
rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/devfs'.
rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/mdconfig2'.
rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/newsyslog'.
rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/syslogd'.
rcorder: Circular dependency on provision `ldconfig' in file `/etc/rc.d/SERVERS'.
rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/archdep'.
rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/SERVERS'.
rcorder: Circular dependency on file `/etc/rc.d/devd'.
rcorder: Circular dependency on provision `network_ipv6' in file `/etc/rc.d/devd'.
rcorder: Circular dependency on provision `network_ipv6' in file `/etc/rc.d/mroute6d'.
rcorder: Circular dependency on provision `network_ipv6' in file `/etc/rc.d/route6d'.
rcorder: Circular dependency on provision `network_ipv6' in file `/etc/rc.d/NETWORKING'.
rcorder: requirement `usbd' in file `/usr/local/etc/rc.d/hald' has no providers.
/etc/rc.d/dumpon
/etc/rc.d/ddb
/etc/rc.d/initrandom
/etc/rc.d/geli
/etc/rc.d/gbde
/etc/rc.d/encswap
/etc/rc.d/ccd
/etc/rc.d/swap1
/etc/rc.d/early.sh
/etc/rc.d/fsck
/etc/rc.d/root
/etc/rc.d/hostid
/etc/rc.d/mdconfig
/etc/rc.d/mountcritlocal
/etc/rc.d/zfs
/etc/rc.d/FILESYSTEMS
/etc/rc.d/var
/etc/rc.d/cleanvar
/etc/rc.d/devfs
/etc/rc.d/ipfilter
/etc/rc.d/addswap
/etc/rc.d/auto_linklocal
/etc/rc.d/sysctl
/etc/rc.d/hostname
/etc/rc.d/ipmon
/etc/rc.d/mdconfig2
/etc/rc.d/newsyslog
[color="Red"]/etc/rc.d/syslogd[/color]
/etc/rc.d/savecore
/etc/rc.d/archdep
/etc/rc.d/abi
/etc/rc.d/SERVERS
/etc/rc.d/named
/etc/rc.d/random
/etc/rc.d/adjkerntz
/etc/rc.d/atm1
/etc/rc.d/ipnat
/etc/rc.d/ipfs
/etc/rc.d/kldxref
/etc/rc.d/sppp
/etc/rc.d/serial
[color="Red"]/etc/rc.d/netif[/color]
/etc/rc.d/isdnd
/etc/rc.d/ppp
/etc/rc.d/ipfw
/etc/rc.d/nsswitch
.
.
.

Of course, syslogd tries to bind a socket, but netif configures networking. I get the following problem in this situation:

Code:
Dec  9 16:51:28 syslogd: bind: Can't assign requested address
Dec  9 16:51:28 syslogd: bind: Can't assign requested address

The root cause seems to be /usr/local/etc/rc.d/freenet6 script. When I move it away, the order problems disappear.

This is the freenet6 script head:
Code:
# PROVIDE: freenet6
# REQUIRE: NETWORKING netif named
# BEFORE: ip6addrctl
# KEYWORD: shutdown

Now I see the problem: BEFORE ip6addrctl and after NETWORKING is clearly wrong. Do you have an idea what correct dependencies freenet6 needs?
 
On my machine netif starting before syslog:

[root@ ~]# rcorder /etc/rc.d/*
/etc/rc.d/dumpon
/etc/rc.d/ddb
/etc/rc.d/initrandom
/etc/rc.d/geli
/etc/rc.d/gbde
/etc/rc.d/encswap
/etc/rc.d/ccd
/etc/rc.d/swap1
/etc/rc.d/early.sh
/etc/rc.d/fsck
/etc/rc.d/root
/etc/rc.d/hostid
/etc/rc.d/mdconfig
/etc/rc.d/mountcritlocal
/etc/rc.d/zfs
/etc/rc.d/FILESYSTEMS
/etc/rc.d/var
/etc/rc.d/cleanvar
/etc/rc.d/random
/etc/rc.d/adjkerntz
/etc/rc.d/atm1
/etc/rc.d/hostname
/etc/rc.d/ipfilter
/etc/rc.d/ipnat
/etc/rc.d/ipfs
/etc/rc.d/kldxref
/etc/rc.d/sppp
/etc/rc.d/addswap
/etc/rc.d/auto_linklocal
/etc/rc.d/sysctl
/etc/rc.d/serial
/etc/rc.d/netif
/etc/rc.d/ip6addrctl
/etc/rc.d/atm2
/etc/rc.d/pfsync
/etc/rc.d/pflog
/etc/rc.d/pf
/etc/rc.d/ppp
/etc/rc.d/routing
/etc/rc.d/ip6fw
/etc/rc.d/network_ipv6
/etc/rc.d/devd
/etc/rc.d/ipsec
/etc/rc.d/ipfw
/etc/rc.d/nsswitch
/etc/rc.d/resolv
/etc/rc.d/mroute6d
/etc/rc.d/route6d
/etc/rc.d/mrouted
/etc/rc.d/routed
/etc/rc.d/defaultroute
/etc/rc.d/netoptions
/etc/rc.d/NETWORKING
/etc/rc.d/mountcritremote
/etc/rc.d/devfs
/etc/rc.d/ipmon
/etc/rc.d/mdconfig2
/etc/rc.d/newsyslog
/etc/rc.d/syslogd
/etc/rc.d/savecore
/etc/rc.d/ldconfig
/etc/rc.d/archdep
/etc/rc.d/abi
/etc/rc.d/SERVERS
/etc/rc.d/named
/etc/rc.d/ntpdate
/etc/rc.d/rpcbind
/etc/rc.d/nisdomain
/etc/rc.d/ypserv
/etc/rc.d/ypxfrd
/etc/rc.d/ypupdated
/etc/rc.d/ypbind
/etc/rc.d/ypset
/etc/rc.d/yppasswdd
/etc/rc.d/wpa_supplicant
/etc/rc.d/accounting
/etc/rc.d/nfsclient
/etc/rc.d/amd
/etc/rc.d/atm3
/etc/rc.d/auditd
/etc/rc.d/tmp
/etc/rc.d/cleartmp
/etc/rc.d/dmesg
/etc/rc.d/ipxrouted
/etc/rc.d/kerberos
/etc/rc.d/kadmind
/etc/rc.d/keyserv
/etc/rc.d/kpasswdd
/etc/rc.d/gssd
/etc/rc.d/quota
/etc/rc.d/nfsserver
/etc/rc.d/mountd
/etc/rc.d/nfsd
/etc/rc.d/statd
/etc/rc.d/lockd
/etc/rc.d/pppoed
/etc/rc.d/pwcheck
/etc/rc.d/virecover
/etc/rc.d/DAEMON
/etc/rc.d/watchdogd
/etc/rc.d/ugidfw
/etc/rc.d/timed
/etc/rc.d/apm
/etc/rc.d/apmd
/etc/rc.d/bootparams
/etc/rc.d/hcsecd
/etc/rc.d/bthidd
/etc/rc.d/local
/etc/rc.d/lpd
/etc/rc.d/motd
/etc/rc.d/mountlate
/etc/rc.d/nscd
/etc/rc.d/ntpd
/etc/rc.d/powerd
/etc/rc.d/rarpd
/etc/rc.d/sdpd
/etc/rc.d/rfcomm_pppd_server
/etc/rc.d/rtadvd
/etc/rc.d/rwho
/etc/rc.d/LOGIN
/etc/rc.d/syscons
/etc/rc.d/sshd
/etc/rc.d/sendmail
/etc/rc.d/cron
/etc/rc.d/jail
/etc/rc.d/localpkg
/etc/rc.d/securelevel
/etc/rc.d/power_profile
/etc/rc.d/othermta
/etc/rc.d/natd
/etc/rc.d/msgs
/etc/rc.d/moused
/etc/rc.d/mixer
/etc/rc.d/inetd
/etc/rc.d/idmapd
/etc/rc.d/hostapd
/etc/rc.d/geli2
/etc/rc.d/ftpd
/etc/rc.d/ftp-proxy
/etc/rc.d/dhclient
/etc/rc.d/bsnmpd
/etc/rc.d/bridge
/etc/rc.d/bluetooth
/etc/rc.d/bgfsck
[root@ ~]#

May be you forget sync default /etc/* files after upgrade system?
Try cvsup you /usr/src tree and
mergemaster -a |tee /tmp/out.txt
and analyze /tmp/out.txt for string
*** Beginning comparison

*** Checking /etc/rc.d for stale files

*** No stale files found
and
*** Files that remain for you to merge by hand:

May be you distribution of /etc out of date?
 
Wow sorry! I forget install freenet6. Yes, my orders is mix up too where netif start after syslog. You can make send-pr for reports the problem
 
Back
Top