Re: Odd failure of smbd to start from init.d - CentOS 5.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, May 20, 2010 at 04:55:29PM -0700, Jerry Franz wrote:

> I would start by comparing the values of all the environment variables 
> between running as /bin/sh and /bin/bash:
> 
> env > bash_env.txt
> /bin/sh
> env > sh_env.txt
> exit
> diff bash_env.txt sh_env.txt

Jerry,

That's a good idea. To repeat my earlier findings both these work:

"bash /etc/init.d/smb start"
"sh /etc/init.d/smb start"

and that's with either #!/bin/sh or #!/bin/bash as the first line.

Meanwhile this doesn't work

"/etc/init.d/smb start"

and that's with either #!/bin/sh or #!/bin/bash as the first line.

Also, if I go to sh as the shell:

"/etc/init.d/smb start" - doesn't work

"sh /etc/init.d/smb start" starts - well, it shows blank rather than [ OK ] for SMB
services, which is different, but it starts both smbd and nmbd just fine.

and

"bash /etc/init.d/smb start" works in the sh shell just fine too. 

So the difference in envars isn't the difference in whether it runs, unless
running a shell within a shell (within a shell) does something odd to them.

In any case:

# diff bash_env.txt sh_env.txt
2d1
< TERM=rxvt
3a3
> TERM=rxvt
6d5
< OLDPWD=/var/log/samba/cores/smbd
10d8
< MAIL=/var/spool/mail/root
12c10,11
< INPUTRC=/etc/inputrc
---
> MAIL=/var/spool/mail/root
> _=/bin/env
13a13
> INPUTRC=/etc/inputrc
15d14
< SHLVL=1
16a16
> SHLVL=2
22d21
< _=/bin/env

Do you see something there I don't? 

I'm starting to feel the bad hardware hypothesis might be the only one left
standing. The smb script and environment seems too simple to go so wrong.

Whit
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux