RE: [SLE] what's the SuSE equivalent to service?
|-----Original Message----- |From: radoeka [mailto:radoeka@xs4all.nl] |Sent: 14. mars 2006 15:49 |To: suse-linux-e@suse.com |Subject: Re: [SLE] what's the SuSE equivalent to service? | |On Tue, Mar 14, 2006 at 10:42:55AM +0100, Philipp Thomas wrote: |> On Mon, 13 Mar 2006 09:14:11 +0100, Dave Cotton wrote: |> |> >So what is wrong with ln -s /etc/init.d/xxx /usr/sbin/rcxxx or must |> >we always cater for MCSEs? |> |> Nothing is wrong with the symlink. The point was, that you can't |> expect to find it in packages not done by SUSE, as Richard's mail |> seemed to imply. | |I assumed the it was a suse package indeed. philip is right |that if the packages is not doen by suse the rc* link might |not be there (how inconvenient). | Use chkconfig It works on both suse and redhat (ripped from irix): Add a chkconfig comment to your script: # added for redhat/suse chkconfig compatibility # chkconfig: 345 99 10 # description: Secana deamon s3d startup Then create the softlink for the app to /etc/init.d/ mbjlinux:~ # ln -s /opt/s3/server/s3init /etc/init.d/secana mbjlinux:~ # chkconfig --add secana mbjlinux:~ # chkconfig --list secana secana 0:off 1:off 2:off 3:on 4:off 5:on 6:off (also notice that suse does not use runlevel4 and it is taken care of). When porting between SLES <-> RHEL: Ensure SLES' /etc/rc_status and RHEL's /etc/init.d/functions are compatible. We just ripped the best/simplest from both and sourced it so all services looks the same as the others. -- MortenB
On 3/14/06, Morten Bjørnsvik
Use chkconfig
It works on both suse and redhat (ripped from irix):
Add a chkconfig comment to your script: # added for redhat/suse chkconfig compatibility # chkconfig: 345 99 10 # description: Secana deamon s3d startup
what script are you talking about adding this to? Do you mean, simply create a bash script for launching the app, and be sure to add these comments at the top of the script file? And what is the signifigance of the "chkconfig: 345 99 10" line? (ie what do the numbers mean? Will they always be the same for each app we are trying to use with chkconfig?)
Then create the softlink for the app to /etc/init.d/
mbjlinux:~ # ln -s /opt/s3/server/s3init /etc/init.d/secana mbjlinux:~ # chkconfig --add secana mbjlinux:~ # chkconfig --list secana secana 0:off 1:off 2:off 3:on 4:off 5:on 6:off
(also notice that suse does not use runlevel4 and it is taken care of).
this is very cool, and will help me hugely if this is all there is to it. Thanx much! peter
participants (2)
-
Morten Bjørnsvik
-
Peter Van Lone