[CentOS] creating script for init.d

Tue Dec 19 05:23:45 UTC 2006
Linux Man <linuxman.uru at gmail.com>

I'm not using "su".
I don't know how can I do!

2006/12/18, Michael Velez <mikev777 at hotmail.com>:
>
>
>
>
> > -----Original Message-----
> > From: centos-bounces at centos.org
> > [mailto:centos-bounces at centos.org] On Behalf Of Linux Man
> > Sent: Sunday, December 17, 2006 8:30 PM
> > To: centos at centos.org
> > Subject: [CentOS] 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 at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20061219/d2d65484/attachment-0005.html>