From: Daniel Hokka Zakrisson Date: Tue, 12 Sep 2006 17:17:03 +0000 (+0000) Subject: Add Herbert Pötzl's patch to support initialization scriptlets. X-Git-Tag: release-0.30.211~47 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d58e513f496573af43ae335a20547f67f47cf3f2;p=util-vserver.git Add Herbert Pötzl's patch to support initialization scriptlets. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2308 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/doc/configuration.xml b/doc/configuration.xml index 323aaee..9cd95f5 100644 --- a/doc/configuration.xml +++ b/doc/configuration.xml @@ -770,6 +770,57 @@ environment variable must be set by one of the in-shellcontext scripts (the non-executable ones). + + +The scriptlet which will be executed before the root filesystem is mounted and +the configuration has been loaded. Before executing the script, the +configuration directory will be made the working directory. + + + + +The configuration directory of the current vserver. + + + + +The name of the current vserver. + + + + +The fixed value of the current action (e.g. 'prepre-start', 'post-stop'...). + + + + + + +Repository of initialize like scripts. Before executing the script, +the configuration directory will be made the working directory. + + + See initialize. + + + +The configuration directory of the current vserver. + + + + +The name of the current vserver. + + + + +The fixed value of the current action (e.g. 'prepre-start', 'post-stop'...). + + + + + + The scriptlet which will be executed before the network-interfaces are diff --git a/scripts/vserver.start b/scripts/vserver.start index 98a07cd..4230614 100644 --- a/scripts/vserver.start +++ b/scripts/vserver.start @@ -100,6 +100,10 @@ trap "cleanup" EXIT sanityCheck "$VSERVER_DIR" +pushd "$VSERVER_DIR" >/dev/null +execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" initialize +popd >/dev/null + mountRootFS "$VSERVER_DIR" generateOptions "$VSERVER_DIR"