RE: creating script for init.d

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



 

> -----Original Message-----
> From: centos-bounces@xxxxxxxxxx 
> [mailto:centos-bounces@xxxxxxxxxx] On Behalf Of Linux Man
> Sent: Sunday, December 17, 2006 8:30 PM
> To: centos@xxxxxxxxxx
> Subject:  creating script for init.d
> 
> Hello.
> I'm moving from a very old Fedora Core 1 to CentOS 4.4, what 
> a change!!
> Three year ago, I wrote some script (network related) and 
> worked very well. Now, I can put into init.d by means of 
> chkconfig and I restarted the system, but always hang when 
> executing my srcipt (in my new centos 4.4 ).
> There a manual for making scripts for init.d?
> there is some new requirement by which it does not work anymore?
> Thanks a lots!!!!
>  
> 

Are you using the 'su' command in your script?

This happenned to me when I moved to RHEL4/Centos 4.  My problem was due to
SELinux.  I was using the 'su' command.  When I changed it to use the
'runuser' command instead, it worked fine.  The reason it was hanging for me
is that using the su command produces a context question on the console
(during password checking) for which I had to press enter.  With 'runuser',
you don't get the SELinux context question. 

Michael

_______________________________________________
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