6.1-prerelease, /etc/rc.d/localpkg, rc.subr and samba3
Mars G. Miro
marsgmiro at gmail.com
Mon Feb 13 18:41:09 PST 2006
On 2/14/06, Doug Barton <dougb at freebsd.org> wrote:
> Mars G. Miro wrote:
> > Hi there,
> >
> > Today I upgraded a 6.0Rp4 box to RELENG_6 w/c brings it to
> > 6.1-PRERELEASE. This box has a jail w/c has samba (samba-3.0.21a,1)
> > installed and after the usual build{world,kernel},
> > install{kernel,world}, mergemaster process, I found out that samba
> > would not start during boot. I traced it to /etc/rc.d/localpkg.
> > Reverting this to the 6.0Rp4 version works. I'm no rc guru but seems
> > that 'find_local_scripts_{old|new}' in /etc/rc.subr doesnt actually
> > find the local_startup rc scripts?
>
> The samba boot script is a new style rc.d script, so it will be found by
> rc.subr, but won't be started unless you have samba_enable=yes in
> /etc/rc.conf.local (or rc.conf).
>
This is the most-recent samba3 and it has the new rc.d script. Of
course I have that knob in my /etc/rc.conf:
...
# Samba/Winbindd
samba_enable="YES"
winbindd_enable="YES"
# set just for debugging purposes
rc_debug="YES"
rc_info="YES"
...
root at jail:~# ps auxww
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 9152 0.0 0.1 3540 1144 ?? SsJ 4:21PM 0:00.11
/usr/sbin/syslogd -ss
root 9205 0.0 0.2 19460 3704 ?? IsJ 4:21PM 0:00.01 /usr/sbin/sshd
root 9212 0.0 0.1 4604 1324 ?? IsJ 4:21PM 0:00.16 /usr/sbin/cron -s
root 16398 0.0 0.2 32520 4100 ?? IsJ 10:32AM 0:00.02 sshd:
mars [priv] (sshd)
mars 16400 0.0 0.2 32472 4188 ?? SJ 10:32AM 0:00.02 sshd:
mars at ttyp1 (sshd)
mars 16401 0.0 0.1 8664 3128 p1 IsJ 10:32AM 0:00.01 -csh (csh)
root 16402 0.0 0.1 18200 1600 p1 IJ 10:32AM 0:00.00 su -l root
root 16403 0.0 0.2 8672 3144 p1 SJ 10:32AM 0:00.02 -su (csh)
root 16596 0.0 0.1 4640 1116 p1 R+J 10:38AM 0:00.00 ps auxww
Running the new localpkg rc:
root at jail:~# /etc/rc.d/localpkg start
/etc/rc.d/localpkg: DEBUG: run_rc_command: evaluating pkg_start().
Local package initialization:.
Nothing happens:
root at jail:~# ps auxww
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 9152 0.0 0.1 3540 1144 ?? SsJ 4:21PM 0:00.11
/usr/sbin/syslogd -ss
root 9205 0.0 0.2 19460 3704 ?? IsJ 4:21PM 0:00.01 /usr/sbin/sshd
root 9212 0.0 0.1 4604 1324 ?? SsJ 4:21PM 0:00.16 /usr/sbin/cron -s
root 16398 0.0 0.2 32520 4100 ?? IsJ 10:32AM 0:00.02 sshd:
mars [priv] (sshd)
mars 16400 0.0 0.2 32472 4188 ?? SJ 10:32AM 0:00.02 sshd:
mars at ttyp1 (sshd)
mars 16401 0.0 0.1 8664 3128 p1 IsJ 10:32AM 0:00.01 -csh (csh)
root 16402 0.0 0.1 18200 1600 p1 IJ 10:32AM 0:00.00 su -l root
root 16403 0.0 0.2 8672 3144 p1 SJ 10:32AM 0:00.02 -su (csh)
root 16602 0.0 0.1 4640 1116 p1 R+J 10:38AM 0:00.00 ps auxww
However, using the one from 6.0Rp4:
root at jail:~# /home/backups/etc/rc.d/localpkg start
/home/backups/etc/rc.d/localpkg: DEBUG: run_rc_command: evaluating pkg_start().
Local package initialization:/usr/local/etc/rc.d/samba.sh: DEBUG:
checkyesno: samba_enable is set to YES.
/usr/local/etc/rc.d/samba.sh: DEBUG: checkyesno: nmbd_enable is set to YES.
/usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: evaluating nmbd_precmd().
Starting SAMBA: removing stale tdbs :
/var/db/samba/connections.tdb
/var/db/samba/messages.tdb
/var/db/samba/sessionid.tdb
/var/db/samba/unexpected.tdb
/var/db/samba/brlock.tdb
/var/db/samba/locking.tdb
Starting nmbd.
/usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: _doit:
/usr/local/sbin/nmbd -D -s /usr/local/etc/smb.conf
/usr/local/etc/rc.d/samba.sh: DEBUG: checkyesno: smbd_enable is set to YES.
/usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: evaluating :().
Starting smbd.
/usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: _doit:
/usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf
/usr/local/etc/rc.d/samba.sh: DEBUG: checkyesno: winbindd_enable is set to YES.
/usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: evaluating :().
Starting winbindd.
/usr/local/etc/rc.d/samba.sh: DEBUG: run_rc_command: _doit:
/usr/local/sbin/winbindd -s /usr/local/etc/smb.conf
.
It runs:
root at jail:~# ps auxww
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 16638 3.0 0.3 23040 6444 ?? SsJ 10:38AM 0:00.02
/usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf
root 16648 3.0 0.3 21048 5764 ?? SJ 10:38AM 0:00.03
/usr/local/sbin/winbindd -s /usr/local/etc/smb.conf
root 9152 0.0 0.1 3540 1144 ?? SsJ 4:21PM 0:00.11
/usr/sbin/syslogd -ss
root 9205 0.0 0.2 19460 3704 ?? IsJ 4:21PM 0:00.01 /usr/sbin/sshd
root 9212 0.0 0.1 4604 1324 ?? SsJ 4:21PM 0:00.16 /usr/sbin/cron -s
root 16398 0.0 0.2 32520 4100 ?? IsJ 10:32AM 0:00.02 sshd:
mars [priv] (sshd)
mars 16400 0.0 0.2 32472 4188 ?? SJ 10:32AM 0:00.02 sshd:
mars at ttyp1 (sshd)
root 16629 0.0 0.2 18528 4172 ?? SsJ 10:38AM 0:00.01
/usr/local/sbin/nmbd -D -s /usr/local/etc/smb.conf
root 16647 0.0 0.3 19632 5316 ?? SsJ 10:38AM 0:00.00
/usr/local/sbin/winbindd -s /usr/local/etc/smb.conf
root 16649 0.0 0.3 23040 6428 ?? SJ 10:38AM 0:00.00
/usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf
mars 16401 0.0 0.1 8664 3128 p1 IsJ 10:32AM 0:00.01 -csh (csh)
root 16402 0.0 0.1 18200 1600 p1 IJ 10:32AM 0:00.00 su -l root
root 16403 0.0 0.2 8672 3144 p1 SJ 10:32AM 0:00.02 -su (csh)
root 16650 0.0 0.1 4644 1120 p1 R+J 10:38AM 0:00.00 ps auxww
root at jail:~# uname -a
FreeBSD jail.XXXXX 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Mon Feb
13 13:06:51 PHT 2006 root at XXXXX:/usr/obj/usr/src/sys/XXXX amd64
Thanks.
> Doug
>
> --
>
> This .signature sanitized for your protection
>
>
cheers
mars
More information about the freebsd-rc
mailing list