LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-13-2014, 05:47 AM   #1
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware64-current
Posts: 249

Rep: Reputation: 24
Managing the services


Hi everyone,
As we are noticed, the Slackware-way to managing manually the services is simply /etc/rc.d/rc.$SERVICE {start|stop|restart|status} and to make services is running on startup, is enabling or disabling the execution permissions. In an another distributions are provided the service utility, which allows to manage the services just by running 'service $SERVICE start|stop|restart|status'. It is possible to implement 'service' as a shell script, and my question is it really need or not? If need, I can do this.
 
Old 11-13-2014, 06:04 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
it is possible, but i'm sure for most people who have used Slackware, it won't be necessary for them, since in most cases you enable a service and never turn it off
 
Old 11-13-2014, 06:20 AM   #3
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
if you are lazy, in .bashrc
PATH=/etc/rc.d/:$PATH

then just
rc.service start|stop|whatever
 
Old 11-13-2014, 07:58 AM   #4
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,967

Rep: Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545
Sure it is possible, but why?

/etc/rc.d/rc.whatever doit

_and_

service whatever doit

are pretty much the same to me.

I don't need a service command.
 
Old 11-13-2014, 10:43 AM   #5
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware64-current
Posts: 249

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by genss View Post
if you are lazy, in .bashrc
PATH=/etc/rc.d/:$PATH

then just
rc.service start|stop|whatever
Yes, but I'm not sure that don't cause another problems.
To all: thanks you for replies.
 
Old 11-13-2014, 12:15 PM   #6
NathanBarley
Member
 
Registered: Oct 2014
Location: Western Pennsylvania
Distribution: Slackware, Crux, Gentoo, FreeBSD
Posts: 94

Rep: Reputation: Disabled
Quote:
Originally Posted by yars View Post
Yes, but I'm not sure that don't cause another problems.
To all: thanks you for replies.
Are you asking it like a philosophical question?

I think Slackware quite deliberately avoids 'helper' tools like service and chkconfig as part of the KISS principle, but as you can see it's entirely possible to cobble up something similar.
 
Old 11-14-2014, 08:13 AM   #7
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by NathanBarley View Post
Are you asking it like a philosophical question?

I think Slackware quite deliberately avoids 'helper' tools like service and chkconfig as part of the KISS principle
Tools like chkconfig don't make sense on BSD init. Let me take an example.

To activate CUPS on Slackware, it's as simple as:

Code:
# chmod +x /etc/rc.d/rc.cups
When rc.cups is executable, rc.M will start it in the multiuser runlevels, that is 3 and 4. (And 2, but that's only of academic interest.)

Whereas for chkconfig, it allows me to activate CUPS without manually setting/removing a myriad of symlinks:

Code:
# chkconfig --level 2345 cups on
Or simply:

Code:
# chkconfig cups on
As for the service tool, I'm not sure. As far as I can tell, on systems mixing SysV and Upstart, the service command allows some sort of uniformity even if services are managed differently under the hood. Some time ago I had to configure an Ubuntu server, and I was quite puzzled by the mess^^^^^^^diversity of startup management methods.
 
Old 11-19-2014, 12:31 PM   #8
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware64-current
Posts: 249

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by NathanBarley View Post
Are you asking it like a philosophical question?
Yes. And the KISS principes does not prevent to have a 'helpers' like liloconfig, xwmconfig, netconfig. This topic also is on a wave of threads about Slackware's initialization system, just to make it more better than it is at this time.
 
Old 11-19-2014, 01:18 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Those 'helpers' are shell scripts to make things easier. That is exactly what the rc.* files are. Shell scripts to make starting and stopping programs easier.

Not trying to start anything here, just pointing out the similarities
 
Old 11-19-2014, 01:23 PM   #10
Soderlund
Member
 
Registered: Aug 2012
Posts: 185

Rep: Reputation: 81
Quote:
Originally Posted by chrisretusn View Post
/etc/rc.d/rc.whatever doit

_and_

service whatever doit

are pretty much the same to me.
Almost alias-able, but not really because of the space.

Code:
$ cat service
#!/bin/sh
/etc/rc.d/rc.$1 $2
 
Old 11-19-2014, 05:25 PM   #11
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
There's a dialog box in pkgtool where you can check and uncheck which services run on startup.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Managing Services on Linux with systemd LXer Syndicated Linux News 0 12-20-2011 04:00 PM
LXer: Managing Services on Linux with systemd LXer Syndicated Linux News 0 12-20-2011 11:50 AM
Managing Directory Services, Auth., & Security in Mixed Win/Lin Networks ITintuition Linux - Networking 0 11-01-2006 12:40 PM
LXer: Managing Your Services Business with Open Source Software LXer Syndicated Linux News 0 05-21-2006 03:54 AM
Managing Services: Apache PipIWYG Linux - Newbie 3 11-06-2003 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration