aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-02-16 23:08:41 +0100
committerBill Nottingham <notting@redhat.com>2011-02-17 14:51:18 -0500
commit8faaa3060b652002b56f616e16d550a4a9e77a6f (patch)
tree33024924a221a6b2a47f2229dca562e14fcdb21e /rc.d/init.d
parent752dd0d9b3400dad7e8e631135e9c17c624a8c4c (diff)
downloadinitscripts-8faaa3060b652002b56f616e16d550a4a9e77a6f.tar
initscripts-8faaa3060b652002b56f616e16d550a4a9e77a6f.tar.gz
initscripts-8faaa3060b652002b56f616e16d550a4a9e77a6f.tar.bz2
initscripts-8faaa3060b652002b56f616e16d550a4a9e77a6f.tar.xz
initscripts-8faaa3060b652002b56f616e16d550a4a9e77a6f.zip
systemctl: honour $SYSTEMCTL_IGNORE_DEPENDENCIES
Here's a patch for initscripts: If SYSTEMCTL_IGNORE_DEPENDENCIES is set, pass --ignore-dependencies to systemctl. This allows programs which invoke /sbin/service to get more SysV-like behaviour, i.e. where starting a service does not pull in any dependencies and honours no ordering. By default we continue to honour the dependencies since this is usually safe and allows other software to hook into all services regardless by who they are started. This is the result of a discussion with the IPA people, Simo Sorce in particular.
Diffstat (limited to 'rc.d/init.d')
-rw-r--r--rc.d/init.d/functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 1256d10e..3f2cbc50 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -26,6 +26,7 @@ systemctl_redirect () {
local s
local prog=${1##*/}
local command=$2
+ local options=""
case "$command" in
start)
@@ -42,7 +43,11 @@ systemctl_redirect () {
;;
esac
- action "$s" /bin/systemctl $command "$prog.service"
+ if [ -n "$SYSTEMCTL_IGNORE_DEPENDENCIES" ] ; then
+ options="--ignore-dependencies"
+ fi
+
+ action "$s" /bin/systemctl $options $command "$prog.service"
}
# Get a sane screen width