blob: 51e5ca4fda3992390b71600d922820f1c8cbf3ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# This file gets sourced from /etc/init.d/vservers-default.
# We want to use our modified version of util-vserver-vars,
# so that we can fire up our modified version of the vserver
# script and do the network namespace setup stuff even for
# vservers that get started up during boot.
if [ -r "/usr/lib/util-vserver/netns/util-vserver-vars" ]; then
UTIL_VSERVER_VARS="/usr/lib/util-vserver/netns/util-vserver-vars"
export UTIL_VSERVER_VARS
fi
# We also add the possibilities to set other variables without
# modifying this file. So we and some clever sourcing here.
# (This has also the possibility to start other marks without
# copying the script, but symlinking it.)
name="$(basename "$0")"
# This is a requirement, stated in the init script. So we set it
# here, to not bother the user.
LOCKFILE="$name"
# Include default configuration
if [[ -r "/etc/vservers/.defaults/apps/vserver-startup/default" ]]; then
. "/etc/vservers/.defaults/apps/vserver-startup/default"
fi
# Include special configuration for initscript
if [ "$name" = "${name#vserver-default[-.]}" ]; then
falvor="${name#vserver-default[-.]}"
else
flavor="${name#vserver[-.]}"
fi
if [[ "default" != "$flavor" &&
-r "/etc/vservers/.defaults/apps/vserver-startup/$flavor" ]]; then
. "/etc/vservers/.defaults/apps/vserver-startup/$flavor"
fi
unset flavor
unset name
# Added the ability to disable a flaver without disabling the
# initscript. (Debian enables all initscripts during installation
# of a package, so that we may want another way to disable it.)
[ "$ENABLE" != "0" ] || exit 0
|