summaryrefslogtreecommitdiffstats
path: root/core/modules/systemd
diff options
context:
space:
mode:
authorSimon Rettberg2019-04-25 15:06:41 +0200
committerSimon Rettberg2019-04-25 15:06:41 +0200
commitd84a8f3e0d7cc46e68bf6e0022073713969cb31b (patch)
treef3938ebfbffa551b2ebc1ee89fcc4b8de89c583a /core/modules/systemd
parent[systemd] Add our own systemd-kexec without umount (diff)
downloadmltk-d84a8f3e0d7cc46e68bf6e0022073713969cb31b.tar.gz
mltk-d84a8f3e0d7cc46e68bf6e0022073713969cb31b.tar.xz
mltk-d84a8f3e0d7cc46e68bf6e0022073713969cb31b.zip
[systemd] Remove script that has never done anything anyways
Useless script powered by OpenSLX since 2013!
Diffstat (limited to 'core/modules/systemd')
-rw-r--r--core/modules/systemd/data/etc/systemd/system/systemd-halt.service1
-rw-r--r--core/modules/systemd/data/etc/systemd/system/systemd-poweroff.service1
-rw-r--r--core/modules/systemd/data/etc/systemd/system/systemd-reboot.service1
-rwxr-xr-xcore/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript50
4 files changed, 0 insertions, 53 deletions
diff --git a/core/modules/systemd/data/etc/systemd/system/systemd-halt.service b/core/modules/systemd/data/etc/systemd/system/systemd-halt.service
index 95b4f284..a13d67c6 100644
--- a/core/modules/systemd/data/etc/systemd/system/systemd-halt.service
+++ b/core/modules/systemd/data/etc/systemd/system/systemd-halt.service
@@ -14,5 +14,4 @@ After=shutdown.target final.target
[Service]
Type=oneshot
-ExecStartPre=-/bin/bash -c /opt/openslx/scripts/systemd-shutdown_prescript
ExecStart=/usr/bin/systemctl --force halt
diff --git a/core/modules/systemd/data/etc/systemd/system/systemd-poweroff.service b/core/modules/systemd/data/etc/systemd/system/systemd-poweroff.service
index 8b96980e..eede0eab 100644
--- a/core/modules/systemd/data/etc/systemd/system/systemd-poweroff.service
+++ b/core/modules/systemd/data/etc/systemd/system/systemd-poweroff.service
@@ -14,5 +14,4 @@ After=shutdown.target final.target
[Service]
Type=oneshot
-ExecStartPre=-/bin/bash -c /opt/openslx/scripts/systemd-shutdown_prescript
ExecStart=/usr/bin/systemctl --force poweroff
diff --git a/core/modules/systemd/data/etc/systemd/system/systemd-reboot.service b/core/modules/systemd/data/etc/systemd/system/systemd-reboot.service
index be4d608c..b2d27c8e 100644
--- a/core/modules/systemd/data/etc/systemd/system/systemd-reboot.service
+++ b/core/modules/systemd/data/etc/systemd/system/systemd-reboot.service
@@ -14,5 +14,4 @@ After=shutdown.target final.target
[Service]
Type=oneshot
-ExecStartPre=-/bin/bash -c /opt/openslx/scripts/systemd-shutdown_prescript
ExecStart=/usr/bin/systemctl --force reboot
diff --git a/core/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript b/core/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript
deleted file mode 100755
index 3b5d7f92..00000000
--- a/core/modules/systemd/data/opt/openslx/scripts/systemd-shutdown_prescript
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/ash
-
-# This script gets called by ExecStartPre from the services
-# systemd-halt, systemd-poweroff, systemd-reboot. Pre-shutdown actions as
-# unmounting nfs shares etc. should go here.
-
-PATH=/bin:/usr/bin:/opt/openslx/bin
-
-# kill leftover processes
-
-umount_nfs_shares() {
- for i in "$(mount | grep 'type nfs')"; do
- share=$(echo "$i"|cut -f 3 -d " ")
- echo "Unmounte nfs-Share $share ...."
- umount "$share"
- ERROR=$?
- if [ $ERROR -eq 0 ]; then
- echo "nfs-Share $share unmounted."
- else
- echo "Could not umount nfs share $share!"
- ERRORLEVEL=1
- fi
- done
-}
-
-umount_samba_shares() {
- for i in "$(mount | grep 'type cifs')"; do
- share=$(echo $i|cut -f 3 -d " ")
- echo "Unmounte cifs-Share $share ...."
- umount "$share"
- ERROR=$?
- if [ $ERROR -eq 0 ]; then
- echo "cifs-Share $share unmounted."
- else
- echo "Could not umount cifs share $share!"
- ERRORLEVEL=1
- fi
- done
-}
-
-# Searching for nfs-shares in mtab:
-if [ $(echo /etc/mtab | cut -d " " -f 3 | grep -q nfs) ]; then
- umount_nfs_shares
-fi
-
-# Searching for samba-shares:
-if [ $(echo /etc/mtab|cut -d " " -f 3 | grep -q cifs) ]; then
- umount_samba_shares
-fi
-exit $ERRORLEVEL