summaryrefslogtreecommitdiffstats
path: root/satellit_installer/includes/10-script_dropper.inc
diff options
context:
space:
mode:
authorChristian Rößler2015-06-10 17:09:18 +0200
committerChristian Rößler2015-06-10 17:09:18 +0200
commit4e47c561e6c6ff9f13994180106bebb564d12b8e (patch)
tree33e5f43e76b272bbbeab8f8d69d082662df6b0da /satellit_installer/includes/10-script_dropper.inc
parent[SSPS] Some after-install cleaning functions (diff)
downloadsetup-scripts-4e47c561e6c6ff9f13994180106bebb564d12b8e.tar.gz
setup-scripts-4e47c561e6c6ff9f13994180106bebb564d12b8e.tar.xz
setup-scripts-4e47c561e6c6ff9f13994180106bebb564d12b8e.zip
[SSPS] Added systemd compatibility for systemd (WARNING: Maybe buggy, will be debugged further).
Diffstat (limited to 'satellit_installer/includes/10-script_dropper.inc')
-rw-r--r--satellit_installer/includes/10-script_dropper.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/satellit_installer/includes/10-script_dropper.inc b/satellit_installer/includes/10-script_dropper.inc
index e43bffb..c5543da 100644
--- a/satellit_installer/includes/10-script_dropper.inc
+++ b/satellit_installer/includes/10-script_dropper.inc
@@ -33,7 +33,15 @@ drop_keychanger_rclocal() {
HIERDOK
chmod +x /etc/rc.local
fi
-
+ if [ "$SYSTEMD" ]; then
+ if ! grep -q "WantedBy=multi-user.target" /lib/systemd/system/rc-local.service; then
+ echo "" >> /lib/systemd/system/rc-local.service
+ echo "[Install]" >> /lib/systemd/system/rc-local.service
+ echo "WantedBy=multi-user.target" >> /lib/systemd/system/rc-local.service
+ fi
+ systemctl reenable rc-local >/dev/null
+ [ $? -ne 0 ] && echo "Warning - could not enable systemd service rc-local!"
+ fi
}
drop_firstrun_script () {