check whether context is already active before starting the build
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Mon, 4 Jul 2005 22:38:42 +0000 (22:38 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Mon, 4 Jul 2005 22:38:42 +0000 (22:38 +0000)
(http://savannah.nongnu.org/bugs/?func=detailitem&item_id=12849)

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2144 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/vserver-build.functions

index bd617ad..5c6a2aa 100644 (file)
@@ -208,6 +208,10 @@ function base.__cleanup
 
 function base.init
 {
+    test -z "$SETUP_CONTEXT" || ! $_VSERVER_INFO -q "$SETUP_CONTEXT" RUNNING || \
+       panic $"\
+Context '$SETUP_CONTEXT' is already in use. Please select another one."
+
     trap "base.__cleanup" EXIT
     base._initVariables
 }