From 45914431f11ceecbf0963af0005493bd6c8a109d Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Mon, 7 Oct 2013 15:49:22 +0200 Subject: [systemd] Amended shutdown behaviour for systemd: reboot, halt, poweroff. nfs and samba (cifs) umount script hooked via ExecStartPre; script will include kill routines etc. later on for faster shutdowns. Patched services r/h/s. --- .../data/etc/systemd/system/systemd-halt.service | 18 ++++++++++++++++++ .../data/etc/systemd/system/systemd-poweroff.service | 18 ++++++++++++++++++ .../data/etc/systemd/system/systemd-reboot.service | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 remote/modules/systemd/data/etc/systemd/system/systemd-halt.service create mode 100644 remote/modules/systemd/data/etc/systemd/system/systemd-poweroff.service create mode 100644 remote/modules/systemd/data/etc/systemd/system/systemd-reboot.service (limited to 'remote/modules/systemd/data/etc') diff --git a/remote/modules/systemd/data/etc/systemd/system/systemd-halt.service b/remote/modules/systemd/data/etc/systemd/system/systemd-halt.service new file mode 100644 index 00000000..95b4f284 --- /dev/null +++ b/remote/modules/systemd/data/etc/systemd/system/systemd-halt.service @@ -0,0 +1,18 @@ +# 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. + +[Unit] +Description=Halt +Documentation=man:systemd-halt.service(8) +DefaultDependencies=no +Requires=shutdown.target final.target +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/remote/modules/systemd/data/etc/systemd/system/systemd-poweroff.service b/remote/modules/systemd/data/etc/systemd/system/systemd-poweroff.service new file mode 100644 index 00000000..8b96980e --- /dev/null +++ b/remote/modules/systemd/data/etc/systemd/system/systemd-poweroff.service @@ -0,0 +1,18 @@ +# 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. + +[Unit] +Description=Power-Off +Documentation=man:systemd-halt.service(8) +DefaultDependencies=no +Requires=shutdown.target final.target +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/remote/modules/systemd/data/etc/systemd/system/systemd-reboot.service b/remote/modules/systemd/data/etc/systemd/system/systemd-reboot.service new file mode 100644 index 00000000..be4d608c --- /dev/null +++ b/remote/modules/systemd/data/etc/systemd/system/systemd-reboot.service @@ -0,0 +1,18 @@ +# 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. + +[Unit] +Description=Reboot +Documentation=man:systemd-halt.service(8) +DefaultDependencies=no +Requires=shutdown.target final.target +After=shutdown.target final.target + +[Service] +Type=oneshot +ExecStartPre=-/bin/bash -c /opt/openslx/scripts/systemd-shutdown_prescript +ExecStart=/usr/bin/systemctl --force reboot -- cgit v1.2.3-55-g7522