LinuxQuestions.org
Review your favorite Linux distribution.
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 06-14-2017, 02:11 PM   #1
limpingstone
Member
 
Registered: Mar 2017
Location: Mountain Time Area
Distribution: Slackware64 14.2
Posts: 52

Rep: Reputation: Disabled
Replacement for systemctl in Slackware


I hope I don't start another fight in this thread, but I feel I am encountering some trouble while learning Linux.

As many would know, most Linux distributions use systemd as their default init system for managing services and daemon, etc using the command 'systemctl'.

I wonder if there are any alternative commands to use instead of 'systemctl'.
Thank you.
 
Old 06-14-2017, 02:19 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,096

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
daemons in Slackware are started and stopped using the shell scripts you can find in /etc/rc.d, there isn't a dedicated command to start/stop them because it's simply not needed : if you want to start apache you just have to make /etc/rc.d/rc.httpd executable and issue a
Code:
/etc/rc.d/rc.httpd start
simple as that.
 
3 members found this post helpful.
Old 06-14-2017, 02:36 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
In Slackware the services (aka daemons) are managed by shell scripts in /etc/rc.d, whose name begins with rc.

Have a look there.

There is no "general" command valid for all services, each script provides its own functions.

Often (but not always) the script allows to {start|stop|restart|check the status of} the service.

The admin can add (and possibly write) additional scripts.

The scripts need to be executable to run (at least this is checked by the scripts that run them).

Some services are started in a given order by /etc/rc.d/{rc.M,rc.S} through execution of the corresponding script.

The others can be started if called from /etc/rc.d/rc.local (to be populated by the admin).

For instance the attached script /etc/rc.d/rc.brltty manages brltty daemons.

In addition, a directory structure and functions are provided to manage scripts ala "ex Red Hat", also to be populated by the admin.

All in all, this structure has been proved versatile and easy to manage over many years.
Attached Files
File Type: txt rc.brltty.txt (1.1 KB, 94 views)

Last edited by Didier Spaier; 06-14-2017 at 03:24 PM.
 
3 members found this post helpful.
Old 06-14-2017, 08:10 PM   #4
limpingstone
Member
 
Registered: Mar 2017
Location: Mountain Time Area
Distribution: Slackware64 14.2
Posts: 52

Original Poster
Rep: Reputation: Disabled
Thanks for the response! Yet how can we find the appropriate script for the desired services?
For example, if we find a code online that tells us to enter:
Code:
systemctl enable atd
How should we translate that to a Slackware command?
I understand that sysV has its init written as shell scripts but couldn't find which to use.
 
Old 06-14-2017, 08:28 PM   #5
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by limpingstone View Post
Thanks for the response! Yet how can we find the appropriate script for the desired services?
For example, if we find a code online that tells us to enter:
Code:
systemctl enable atd
How should we translate that to a Slackware command?
I understand that sysV has its init written as shell scripts but couldn't find which to use.
The atd is started during boot by the /etc/rc.d/rc.M script which is run automatically when entering multi-user mode.

More generally if looking for the script which starts (say) the 'qwerty' service, first check whether there's a an rc.qwerty script in /etc/rc.d directory. If not, grep for qwerty in all files in /etc/rc.d directory (grep -i qwerty /etc/rc.d/rc.* or find /etc/rc.d/ -type f| xargs grep -i qwerty).

chris
 
3 members found this post helpful.
Old 06-14-2017, 08:38 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,310
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
Slackware uses BSD style init scrips, as opposed the SystemV, which was common among most distros, or SystemD, which is becoming common. This gives an overview of how the Slackware init system works: http://www.slackware.com/config/init.php

You can generally start a daemon by cding to the appropriate directory (commonly in /etc) and issuing the command

Code:
[daemon name] start
Sometimes the word "restart" replaces the word "start." You can see the man pages for the respective daemons for details and arguments.

You may also find this article helpful: http://w3shaman.com/article/starting...ally-slackware
 
1 members found this post helpful.
Old 06-16-2017, 07:01 PM   #7
askfor
Member
 
Registered: Aug 2016
Posts: 84

Rep: Reputation: 46
I happen to have Mageia 6 on one of my computers. With Systemd. I managed to create a service which starts simple http server which comes with Python. As prrof of concept.

I had an idea. Creating Systemd unit which emulates BSD style RC system. For people who are forced to use Systemd in their line of work. Do you think it is worth the effort ? Creating a Systemd unit is ... quirky. Perhaps it might make life easier for those who use Systemd not by their own choice.

The idea came to me while playing with FreeBSD, which introduced RCNG, but still maintains traditional RC system.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
is systemctl here to stay? zQUEz Linux - General 3 11-18-2012 06:55 AM
[SOLVED] What's a good replacement for ktts (from kde3.5) for text-to-speech on Slackware 13.3 Z_Tagr Slackware 4 09-12-2011 12:30 AM
Hardware replacement - Slackware krawcm Linux - Newbie 6 01-15-2010 01:19 PM
Kermit/CKermit or replacement in Slackware? randomsel Slackware 7 01-20-2008 09:18 AM
Looking for a Windows software replacement in Linux (Slackware 11) ErV Linux - Software 11 03-30-2007 05:54 PM

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

All times are GMT -5. The time now is 03:31 PM.

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