Strange startup behaviour.

View: New views
4 Messages — Rating Filter:   Alert me  

Strange startup behaviour.

by Danny Carroll-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Since I recently started using freebsd as a adsl gateway I have noticed
some strange things at startup.

/etc/rc.d/natd does not get executed.   If I run it manually it works
fine but not at boot time.

I just rebooted now and (again) had to re-start natd.  Looking at the
startup scipts I see some strange things.  The access time on some
scripts is from yesterday.

I wonder if someone might have an idea on where I'd start to look at
this, or perhaps has seen this behaviour before?   The systems is 7.2 P5.

# ls -lasut /etc/rc.d/
total 382
 2 -r-xr-xr-x   1 root  wheel    285 Jul  3 00:17 adjkerntz
 2 -r-xr-xr-x   1 root  wheel   1763 Jul  3 00:17 random
 2 -r-xr-xr-x   1 root  wheel    405 Jul  3 00:17 FILESYSTEMS
10 -r-xr-xr-x   1 root  wheel   9386 Jul  3 00:17 bluetooth
 2 -r-xr-xr-x   1 root  wheel    328 Jul  3 00:17 ccd
 2 -r-xr-xr-x   1 root  wheel    523 Jul  3 00:17 ddb
 2 -r-xr-xr-x   1 root  wheel   1120 Jul  3 00:17 dumpon
 2 -r-xr-xr-x   1 root  wheel    383 Jul  3 00:17 early.sh
 2 -r-xr-xr-x   1 root  wheel   1151 Jul  3 00:17 encswap
 2 -r-xr-xr-x   1 root  wheel   1248 Jul  3 00:17 fsck
 4 -r-xr-xr-x   1 root  wheel   2173 Jul  3 00:17 gbde
 4 -r-xr-xr-x   1 root  wheel   2702 Jul  3 00:17 geli
 4 -r-xr-xr-x   1 root  wheel   2800 Jul  3 00:17 hostid
 2 -r-xr-xr-x   1 root  wheel   1780 Jul  3 00:17 initrandom
 6 -r-xr-xr-x   1 root  wheel   5130 Jul  3 00:17 mdconfig
 2 -r-xr-xr-x   1 root  wheel    983 Jul  3 00:17 mountcritlocal
 2 -r-xr-xr-x   1 root  wheel    747 Jul  3 00:17 root
 2 -r-xr-xr-x   1 root  wheel    260 Jul  3 00:17 swap1
 4 -r-xr-xr-x   1 root  wheel   3147 Jul  3 00:17 var
 2 -r-xr-xr-x   1 root  wheel    593 Jul  3 00:17 wpa_supplicant
 2 -r-xr-xr-x   1 root  wheel   1335 Jul  3 00:17 zfs
 4 drwxr-xr-x   2 root  wheel   2560 Jul  2 14:20 .
 4 drwxr-xr-x  20 root  wheel   2560 Jul  2 14:20 ..
 2 -r-xr-xr-x   1 root  wheel    887 Jul  2 14:17 bgfsck
 4 -r-xr-xr-x   1 root  wheel   2298 Jul  2 14:17 bridge
 2 -r-xr-xr-x   1 root  wheel    313 Jul  2 14:17 bsnmpd
 2 -r-xr-xr-x   1 root  wheel    382 Jul  2 14:17 cron
 2 -r-xr-xr-x   1 root  wheel    277 Jul  2 14:17 ftp-proxy
 2 -r-xr-xr-x   1 root  wheel    385 Jul  2 14:17 ftpd
 2 -r-xr-xr-x   1 root  wheel   1951 Jul  2 14:17 geli2
 2 -r-xr-xr-x   1 root  wheel    446 Jul  2 14:17 hostapd
 2 -r-xr-xr-x   1 root  wheel    322 Jul  2 14:17 idmapd
 2 -r-xr-xr-x   1 root  wheel    367 Jul  2 14:17 inetd
16 -r-xr-xr-x   1 root  wheel  15107 Jul  2 14:17 jail
 2 -r-xr-xr-x   1 root  wheel   1147 Jul  2 14:17 localpkg
 4 -r-xr-xr-x   1 root  wheel   2462 Jul  2 14:17 mixer
 2 -r-xr-xr-x   1 root  wheel   1668 Jul  2 14:17 moused
 2 -r-xr-xr-x   1 root  wheel    283 Jul  2 14:17 msgs
 2 -r-xr-xr-x   1 root  wheel    350 Jul  2 14:17 othermta
 2 -r-xr-xr-x   1 root  wheel    528 Jul  2 14:17 securelevel
 4 -r-xr-xr-x   1 root  wheel   2570 Jul  2 14:17 sendmail
 2 -r-xr-xr-x   1 root  wheel    933 Jul  2 14:17 sysctl
 4 -r-xr-xr-x   1 root  wheel   2299 Jul  2 14:17 sshd
 6 -r-xr-xr-x   1 root  wheel   4552 Jul  2 14:17 syscons
 2 -r-xr-xr-x   1 root  wheel   1673 Jul  2 14:17 watchdogd
 2 -r-xr-xr-x   1 root  wheel    745 Jul  2 14:17 ypset
 2 -r-xr-xr-x   1 root  wheel    755 Jul  2 14:17 ypupdated
 2 -r-xr-xr-x   1 root  wheel    764 Jul  2 14:17 ypxfrd
 2 -r-xr-xr-x   1 root  wheel    404 Jul  2 14:17 LOGIN
 2 -r-xr-xr-x   1 root  wheel    977 Jul  2 14:17 motd
 2 -r-xr-xr-x   1 root  wheel    713 Jul  2 14:17 mountlate
 2 -r-xr-xr-x   1 root  wheel   1083 Jul  2 14:17 nscd
 2 -r-xr-xr-x   1 root  wheel   1268 Jul  2 14:17 ntpd
 2 -r-xr-xr-x   1 root  wheel    432 Jul  2 14:17 powerd
 2 -r-xr-xr-x   1 root  wheel    346 Jul  2 14:17 rarpd
 4 -r-xr-xr-x   1 root  wheel   2400 Jul  2 14:17 rfcomm_pppd_server
 2 -r-xr-xr-x   1 root  wheel   1684 Jul  2 14:17 rtadvd
 2 -r-xr-xr-x   1 root  wheel    279 Jul  2 14:17 rwho
 2 -r-xr-xr-x   1 root  wheel    471 Jul  2 14:17 sdpd
 2 -r-xr-xr-x   1 root  wheel    286 Jul  2 14:17 timed
 2 -r-xr-xr-x   1 root  wheel    682 Jul  2 14:17 ugidfw
 2 -r-xr-xr-x   1 root  wheel    802 Jul  2 14:17 yppasswdd
 2 -r-xr-xr-x   1 root  wheel    614 Jul  2 14:17 apm
 2 -r-xr-xr-x   1 root  wheel    784 Jul  2 14:17 apmd
 2 -r-xr-xr-x   1 root  wheel    333 Jul  2 14:17 bootparams
 2 -r-xr-xr-x   1 root  wheel    656 Jul  2 14:17 bthidd
 2 -r-xr-xr-x   1 root  wheel    460 Jul  2 14:17 hcsecd
 2 -r-xr-xr-x   1 root  wheel    535 Jul  2 14:17 local
 2 -r-xr-xr-x   1 root  wheel    439 Jul  2 14:17 lpd
 2 -r-xr-xr-x   1 root  wheel    241 Jul  2 14:17 DAEMON
 2 -r-xr-xr-x   1 root  wheel   1610 Jul  2 14:17 virecover
 2 -r-xr-xr-x   1 root  wheel    979 Jul  2 14:17 amd
 4 -r-xr-xr-x   1 root  wheel   2406 Jul  2 14:17 atm3
 2 -r-xr-xr-x   1 root  wheel    574 Jul  2 14:17 auditd
 2 -r-xr-xr-x   1 root  wheel   1703 Jul  2 14:17 cleartmp
 2 -r-xr-xr-x   1 root  wheel   1237 Jul  2 14:17 dhclient
 2 -r-xr-xr-x   1 root  wheel    427 Jul  2 14:17 dmesg
 2 -r-xr-xr-x   1 root  wheel    317 Jul  2 14:17 ipxrouted
 2 -r-xr-xr-x   1 root  wheel    347 Jul  2 14:17 kadmind
 2 -r-xr-xr-x   1 root  wheel    313 Jul  2 14:17 kerberos
 2 -r-xr-xr-x   1 root  wheel    532 Jul  2 14:17 keyserv
 2 -r-xr-xr-x   1 root  wheel    347 Jul  2 14:17 kpasswdd
 2 -r-xr-xr-x   1 root  wheel    944 Jul  2 14:17 lockd
 2 -r-xr-xr-x   1 root  wheel   1035 Jul  2 14:17 mountd
 6 -r-xr-xr-x   1 root  wheel   4454 Jul  2 14:17 named
 2 -r-xr-xr-x   1 root  wheel    955 Jul  2 14:17 nfsclient
 2 -r-xr-xr-x   1 root  wheel    879 Jul  2 14:17 nfsd
 2 -r-xr-xr-x   1 root  wheel    321 Jul  2 14:17 nfsserver
 2 -r-xr-xr-x   1 root  wheel   1828 Jul  2 14:17 nisdomain
 2 -r-xr-xr-x   1 root  wheel    642 Jul  2 14:17 ntpdate
 2 -r-xr-xr-x   1 root  wheel    586 Jul  2 14:17 pppoed
 2 -r-xr-xr-x   1 root  wheel    453 Jul  2 14:17 pwcheck
 2 -r-xr-xr-x   1 root  wheel    601 Jul  2 14:17 quota
 2 -r-xr-xr-x   1 root  wheel    295 Jul  2 14:17 rpcbind
 2 -r-xr-xr-x   1 root  wheel    942 Jul  2 14:17 statd
 4 -r-xr-xr-x   1 root  wheel   2109 Jul  2 14:17 tmp
 2 -r-xr-xr-x   1 root  wheel    635 Jul  2 14:17 ypbind
 2 -r-xr-xr-x   1 root  wheel    720 Jul  2 14:17 ypserv
 2 -r-xr-xr-x   1 root  wheel    243 Jul  2 14:17 SERVERS
 2 -r-xr-xr-x   1 root  wheel    981 Jul  2 14:17 abi
 2 -r-xr-xr-x   1 root  wheel    678 Jul  2 14:17 archdep
 2 -r-xr-xr-x   1 root  wheel   1404 Jul  2 14:17 devfs
 2 -r-xr-xr-x   1 root  wheel    696 Jul  2 14:17 ipmon
 2 -r-xr-xr-x   1 root  wheel   1799 Jul  2 14:17 ldconfig
 6 -r-xr-xr-x   1 root  wheel   6005 Jul  2 14:17 mdconfig2
 2 -r-xr-xr-x   1 root  wheel    453 Jul  2 14:17 newsyslog
 2 -r-xr-xr-x   1 root  wheel   1091 Jul  2 14:17 savecore
 2 -r-xr-xr-x   1 root  wheel   1473 Jul  2 14:17 syslogd
 2 -r-xr-xr-x   1 root  wheel    339 Jul  2 14:17 NETWORKING
 2 -r-xr-xr-x   1 root  wheel    952 Jul  2 14:17 accounting
 2 -r-xr-xr-x   1 root  wheel   1329 Jul  2 14:17 cleanvar
 2 -r-xr-xr-x   1 root  wheel    453 Jul  2 14:17 devd
 2 -r-xr-xr-x   1 root  wheel   1036 Jul  2 14:17 ip6fw
 4 -r-xr-xr-x   1 root  wheel   2196 Jul  2 14:17 ipfilter
 2 -r-xr-xr-x   1 root  wheel   1557 Jul  2 14:17 ipfw
 2 -r-xr-xr-x   1 root  wheel   1119 Jul  2 14:17 ipsec
 2 -r-xr-xr-x   1 root  wheel   1535 Jul  2 14:17 mountcritremote
 2 -r-xr-xr-x   1 root  wheel    273 Jul  2 14:17 mroute6d
 2 -r-xr-xr-x   1 root  wheel    378 Jul  2 14:17 mrouted
 2 -r-xr-xr-x   1 root  wheel    768 Jul  2 14:17 natd
 6 -r-xr-xr-x   1 root  wheel   4322 Jul  2 14:17 netif
 2 -r-xr-xr-x   1 root  wheel   1360 Jul  2 14:17 netoptions
 4 -r-xr-xr-x   1 root  wheel   3790 Jul  2 14:17 network_ipv6
 4 -r-xr-xr-x   1 root  wheel   2609 Jul  2 14:17 nsswitch
 2 -r-xr-xr-x   1 root  wheel   1282 Jul  2 14:17 pf
 4 -r-xr-xr-x   1 root  wheel   2120 Jul  2 14:17 power_profile
 4 -r-xr-xr-x   1 root  wheel   2280 Jul  2 14:17 ppp
 2 -r-xr-xr-x   1 root  wheel   1982 Jul  2 14:17 resolv
 2 -r-xr-xr-x   1 root  wheel    606 Jul  2 14:17 route6d
 2 -r-xr-xr-x   1 root  wheel    500 Jul  2 14:17 routed
 4 -r-xr-xr-x   1 root  wheel   2246 Jul  2 14:17 routing
 4 -r-xr-xr-x   1 root  wheel   2628 Jul  2 14:17 atm2
 2 -r-xr-xr-x   1 root  wheel   1596 Jul  2 14:17 ip6addrctl
 2 -r-xr-xr-x   1 root  wheel   1014 Jul  2 14:17 isdnd
 2 -r-xr-xr-x   1 root  wheel    941 Jul  2 14:17 pflog
 2 -r-xr-xr-x   1 root  wheel    987 Jul  2 14:17 pfsync
 2 -r-xr-xr-x   1 root  wheel    536 Jul  2 14:17 addswap
 6 -r-xr-xr-x   1 root  wheel   4151 Jul  2 14:17 atm1
 2 -r-xr-xr-x   1 root  wheel    577 Jul  2 14:17 auto_linklocal
 4 -r-xr-xr-x   1 root  wheel   2630 Jul  2 14:17 hostname
 2 -r-xr-xr-x   1 root  wheel   1038 Jul  2 14:17 ipfs
 2 -r-xr-xr-x   1 root  wheel    562 Jul  2 14:17 ipnat
 2 -r-xr-xr-x   1 root  wheel    660 Jul  2 14:17 kldxref
 6 -r-xr-xr-x   1 root  wheel   5159 Jul  2 14:17 serial
 2 -r-xr-xr-x   1 root  wheel    822 Jul  2 14:17 sppp
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: Strange startup behaviour.

by Bill Moran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In response to Danny Carroll <fbsd@...>:

> Since I recently started using freebsd as a adsl gateway I have noticed
> some strange things at startup.
>
> /etc/rc.d/natd does not get executed.   If I run it manually it works
> fine but not at boot time.
>
> I just rebooted now and (again) had to re-start natd.  Looking at the
> startup scipts I see some strange things.  The access time on some
> scripts is from yesterday.
>
> I wonder if someone might have an idea on where I'd start to look at
> this, or perhaps has seen this behaviour before?   The systems is 7.2 P5.

Probably good to attach your rc.conf file, as that's the most likely thing
that's wrong, given the information you provided.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: Strange startup behaviour.

by Danny Carroll-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bill Moran wrote:
> Probably good to attach your rc.conf file, as that's the most likely thing
> that's wrong, given the information you provided.
>

That would surprise me.   The thing that looked strange to me was that
there was a heap of files in /etc/rc.d/ that look like they had not been
accessed since the last shutdown of the machine.

Here is my rc.conf

named_enable="YES"
gateway_enable="YES"
hostname="nas.lan"
keymap="us.iso"
sshd_enable="YES"
zfs_enable="YES"

openntpd_enable="YES"

natd_enable="YES"
natd_interface="tun0"
natd_flags="-f /etc/natd.conf"

apache2_enable="YES"
apache2_profiles="default backuppc"
apache2_default_configfile="/usr/local/etc/apache2/httpd.conf"
apache2_backuppc_configfile="/usr/local/etc/apache2/httpd-backuppc.conf"

inetd_enable="YES"

nmbd_enable="YES"
smbd_enable="YES"

winbindd_enable="NO"
backuppc_enable="YES"

rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_enable="YES"
mountd_flags="-n -r"

nut_enable="YES"
nut_upslog_enable="YES"
nut_upsmon_enable="YES"

firewall_enable="YES"
firewall_logging="YES"
firewall_type="custom"
firewall_script="/etc/firewall.rules"

racoon_enable="NO"

pf_enable="NO"                 # Enable PF (load module if required)
pf_rules="/etc/pf.conf"         # rules definition file for pf
pf_flags=""                     # additional flags for pfctl startup
pflog_enable="NO"              # start pflogd(8)
pflog_logfile="/var/log/pflog"  # where pflogd should store the logfile
pflog_flags=""                  # additional flags for pflogd startup

ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="NO"

#For Office subnet
ifconfig_fxp0="inet 172.21.5.118 netmask 255.255.255.248"
#Lan subnet
ifconfig_em0="inet 192.168.10.21 netmask 255.255.255.0 media 1000baseTX
mediaopt full-duplex"
#Media subnet
ifconfig_em1="inet 192.168.1.1 netmask 255.255.255.0 media 100baseTX
mediaopt full-duplex"
# Wireless lan subnet
ifconfig_ath0="inet 192.168.2.1 netmask 255.255.255.0 ssid WIFI wepmode
on weptxkey 1 wepkey 1:0xSomeKeyThatIsPrivate channel 4 mode 11g
mediaopt hostap"
# For the internet PPP0E link
ifconfig_fxp1="inet 10.0.0.2 netmask 255.255.255.0 media 100baseTX
mediaopt full-duplex"

syslogd_flags="-a 172.21.5.0/24:* -a 192.168.10.0/24:*"

smartd_enable="YES"
doorman_enable="YES"
pureftpd_enable="YES"

dhcpd_enable="YES"                          # dhcpd enabled?
dhcpd_flags="-q"                            # command option(s)
dhcpd_conf="/usr/local/etc/dhcpd.conf"      # configuration file
dhcpd_ifaces="ath0 em0 em1"                 # ethernet interface(s)
dhcpd_withumask="022"                       # file creation mask

mysql_enable="YES"
asterisk_enable="YES"




_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: Strange startup behaviour.

by Danny Carroll-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Danny Carroll wrote:
> That would surprise me.   The thing that looked strange to me was that
> there was a heap of files in /etc/rc.d/ that look like they had not been
> accessed since the last shutdown of the machine.

I think I figured out this behaviour.
I believe that the access times are different because at boot time
adjkerntz runs and sets the correct time (or rather zone) during boot.

The times are 10 hours apart which is the difference between UTC and my
time zone.  It was a strange co-incidence that I rebooted my machine
yesterday twice, the second time was almost 10 hours after the first
which is why I was confused.

Perhaps if the clock was set to UTC then this would not happen.

It still does not explain why /etc/rc.d/natd does not start natd at
boot.  I also tried copying /etc/rc.d/natd to /usr/local/etc/rc.d in the
thought that this was a chicken/egg problem and /usr/local/etc/rc.d
scripts might run late enough to work.  But I still need to restart natd
manually.

-D
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."