LinuxQuestions.org
Help answer threads with 0 replies.
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


Closed Thread
  Search this Thread
Old 09-18-2015, 07:01 PM   #1
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
Taking a look at Debian and SystemD check out rc.local :)


Im installing debian just to have a tourists eye look and
i thought my fellow slackers might find this interesting if they havent yet used a systemd distro yet.
Get a gander at rc.local:
Code:
 #  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.local is executable.
[Unit]
Description=/etc/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
RemainAfterExit=yes
And apparently you have to run it as a service and it will only go after network.target.
You cant just drop stuff in there and let it go. I have to say this is a level of technical cunning that leaves me bemused and somewhat chagrined.

The snippet is from a thread at the debian forums http://forums.debian.net/viewtopic.php?f=5&t=124740
The rest of the thread makes interesting reading vis a vis the place of rc.local in the systemd universe.
 
Old 09-18-2015, 07:10 PM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
So... what exactly does this mean for Slackware? Might be useful for Dlackware but that's another story and it's unofficial.

Slackware still uses a BSD-style init system by default, with an option of OpenRC via SBo.

rc.local is just about in every init system, if you want it there. Nothing exactly new. You can add rc.local to just about any init system including systemd, runit, sysvinit, bsdinit, OpenRC, etc. All you have to do is make it the very last executed daemon/service in the listing, and off it goes if you make the script executable.
 
Old 09-18-2015, 07:16 PM   #3
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Original Poster
Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by ReaperX7 View Post
So... what exactly does this mean for Slackware? Might be useful for Dlackware but that's another story and it's unofficial.
I dont know that it means anything for slackware, its just so needlessly complex i found it funny and thought others might too.
What is this Dlackware? Please elaborate.
 
Old 09-18-2015, 07:30 PM   #4
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
Quote:
Originally Posted by fogpipe View Post
Im installing debian just to have a tourists eye look and
i thought my fellow slackers might find this interesting if they havent yet used a systemd distro yet.
Get a gander at rc.local:
Code:
 #  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.local is executable.
[Unit]
Description=/etc/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
RemainAfterExit=yes
And apparently you have to run it as a service and it will only go after network.target.
You cant just drop stuff in there and let it go. I have to say this is a level of technical cunning that leaves me bemused and somewhat chagrined.

The snippet is from a thread at the debian forums http://forums.debian.net/viewtopic.php?f=5&t=124740
The rest of the thread makes interesting reading vis a vis the place of rc.local in the systemd universe.
The quoted file is not rc.local. On my Debian 8 system, this unit file is called /lib/systemd/system/rc-local.service, and /etc/rc.local looks like this:

Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# snip

exit 0
Indeed, this service is enabled by default, and dropping bash commands into rc.local just worked (tm).

Basic mistakes like this one seem to go hand-in-hand with systemd-bashing Please, kill this thread already.
 
2 members found this post helpful.
Old 09-18-2015, 07:34 PM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Quote:
Originally Posted by fogpipe View Post
I dont know that it means anything for slackware, its just so needlessly complex i found it funny and thought others might too.
What is this Dlackware? Please elaborate.
Dlackware is a package-port created by Bartgymnast that uses Slackware+systemd. I'm not sure how up-to-date it is with -Current or 14.1, but you can always give it a look over:

https://github.com/Dlackware

It's not really that complex to have an rc.local handler. It's only as complex as required by the init you choose to use.
 
Old 09-18-2015, 07:34 PM   #6
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Original Poster
Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by qweasd View Post

Basic mistakes like this one seem to go hand-in-hand with systemd-bashing Please, kill this thread already.
Sorry, i dont know that the thread identified it as anything other than rc.local and if it did i didnt see it. My mistake.
Still it seems overly complex to me and amusingly so

Last edited by fogpipe; 09-18-2015 at 07:36 PM.
 
Old 09-18-2015, 07:37 PM   #7
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
Sorry, I sounded like a jerk, I could tell it was an honest mistake
 
1 members found this post helpful.
Old 09-18-2015, 07:41 PM   #8
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Original Poster
Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by ReaperX7 View Post

It's not really that complex to have an rc.local handler. It's only as complex as required by the init you choose to use.
It just seems to me an added and unnecessary layer of abstraction.

Dlackware sounds just awful, ty for the heads up

Last edited by fogpipe; 09-18-2015 at 07:43 PM.
 
Old 09-19-2015, 01:54 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Maybe some forum members are a bit short on memory but LQ issued a ban on Systemd threads. Please try again in five aeons.
 
7 members found this post helpful.
  


Closed Thread



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
[SOLVED] systemd can't 'find' local drives grail Linux - General 9 02-12-2020 08:12 AM
rc.local with systemd upnort Linux - General 7 02-17-2015 03:33 AM
rc.local systemd guna_pmk Linux - Desktop 4 06-15-2012 03:05 AM
X jams taking local peripherals with it Artanicus Linux - Software 1 01-07-2005 01:05 PM

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

All times are GMT -5. The time now is 10:37 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