From b1c4ca25bf58e1925012d1dcdd83d61cecbf87fb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 4 Jan 2013 21:48:47 +0100 Subject: build-sys: make rc-local support part of SYSV compat This also drops automatic selection of the rc local scripts based on the local distro. Distributions now should specify the paths of the rc-local and halt-local scripts on the configure command line. --- units/.gitignore | 2 ++ units/fedora/Makefile | 1 - units/fedora/halt-local.service | 20 -------------------- units/fedora/rc-local.service | 19 ------------------- units/halt-local.service.in | 20 ++++++++++++++++++++ units/rc-local.service.in | 20 ++++++++++++++++++++ units/suse/halt-local.service | 20 -------------------- units/suse/rc-local.service | 19 ------------------- 8 files changed, 42 insertions(+), 79 deletions(-) delete mode 120000 units/fedora/Makefile delete mode 100644 units/fedora/halt-local.service delete mode 100644 units/fedora/rc-local.service create mode 100644 units/halt-local.service.in create mode 100644 units/rc-local.service.in delete mode 100644 units/suse/halt-local.service delete mode 100644 units/suse/rc-local.service (limited to 'units') diff --git a/units/.gitignore b/units/.gitignore index 63c7ba06bb..5e86d30113 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -1,3 +1,5 @@ +/halt-local.service +/rc-local.service /systemd-hybrid-sleep.service /systemd-journal-gatewayd.service /systemd-journal-flush.service diff --git a/units/fedora/Makefile b/units/fedora/Makefile deleted file mode 120000 index 50be21181f..0000000000 --- a/units/fedora/Makefile +++ /dev/null @@ -1 +0,0 @@ -../../src/Makefile \ No newline at end of file diff --git a/units/fedora/halt-local.service b/units/fedora/halt-local.service deleted file mode 100644 index a0a3a292e7..0000000000 --- a/units/fedora/halt-local.service +++ /dev/null @@ -1,20 +0,0 @@ -# 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=/sbin/halt.local Compatibility -ConditionFileIsExecutable=/sbin/halt.local -DefaultDependencies=no -After=shutdown.target -Before=final.target - -[Service] -Type=oneshot -ExecStart=/sbin/halt.local -TimeoutSec=0 -StandardOutput=tty -RemainAfterExit=yes diff --git a/units/fedora/rc-local.service b/units/fedora/rc-local.service deleted file mode 100644 index 3b3bda9f6f..0000000000 --- a/units/fedora/rc-local.service +++ /dev/null @@ -1,19 +0,0 @@ -# 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.d/rc.local is executable. -[Unit] -Description=/etc/rc.d/rc.local Compatibility -After=network.target - -[Service] -Type=forking -ExecStart=/etc/rc.d/rc.local start -TimeoutSec=0 -RemainAfterExit=yes -SysVStartPriority=99 diff --git a/units/halt-local.service.in b/units/halt-local.service.in new file mode 100644 index 0000000000..c8be8965a3 --- /dev/null +++ b/units/halt-local.service.in @@ -0,0 +1,20 @@ +# 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=@RC_LOCAL_SCRIPT_PATH_STOP@ Compatibility +ConditionFileIsExecutable=@RC_LOCAL_SCRIPT_PATH_STOP@ +DefaultDependencies=no +After=shutdown.target +Before=final.target + +[Service] +Type=oneshot +ExecStart=@RC_LOCAL_SCRIPT_PATH_STOP@ +TimeoutSec=0 +StandardOutput=tty +RemainAfterExit=yes diff --git a/units/rc-local.service.in b/units/rc-local.service.in new file mode 100644 index 0000000000..97d44a7a27 --- /dev/null +++ b/units/rc-local.service.in @@ -0,0 +1,20 @@ +# 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 @RC_LOCAL_SCRIPT_PATH_START@ is executable. +[Unit] +Description=@RC_LOCAL_SCRIPT_PATH_START@ Compatibility +ConditionFileIsExecutable=@RC_LOCAL_SCRIPT_PATH_START@ +After=network.target + +[Service] +Type=forking +ExecStart=@RC_LOCAL_SCRIPT_PATH_START@ start +TimeoutSec=0 +RemainAfterExit=yes +SysVStartPriority=99 diff --git a/units/suse/halt-local.service b/units/suse/halt-local.service deleted file mode 100644 index 3a3a7930e2..0000000000 --- a/units/suse/halt-local.service +++ /dev/null @@ -1,20 +0,0 @@ -# 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=/etc/init.d/halt.local Compatibility -ConditionFileIsExecutable=/etc/init.d/halt.local -DefaultDependencies=no -After=shutdown.target -Before=final.target - -[Service] -Type=oneshot -ExecStart=/etc/init.d/halt.local -TimeoutSec=0 -StandardOutput=tty -RemainAfterExit=yes diff --git a/units/suse/rc-local.service b/units/suse/rc-local.service deleted file mode 100644 index 0fd70e0fc9..0000000000 --- a/units/suse/rc-local.service +++ /dev/null @@ -1,19 +0,0 @@ -# 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/init.d/boot.local is executable. -[Unit] -Description=/etc/init.d/boot.local Compatibility -After=network.target - -[Service] -Type=oneshot -ExecStart=/etc/init.d/boot.local -TimeoutSec=0 -RemainAfterExit=yes -SysVStartPriority=99 -- cgit v1.2.3-54-g00ecf