Taking a look at Debian and SystemD check out rc.local :)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.