From 51cef3364af88ae94cec52053dad5d77290dcb64 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 18 Oct 2019 19:37:02 +0200 Subject: [vmchooser2] Add sessionstart delay of 1 second This accounts for the fact that vmchooser now starts the sessionstart script before execv()ing the actual session. In case of a failed execv(), vmchooser has one second to kill this script before it actually does anything. --- core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/modules/vmchooser2') diff --git a/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart index 1cc7eb5f..215077e3 100755 --- a/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart +++ b/core/modules/vmchooser2/data/opt/openslx/vmchooser/sessionstart @@ -1,5 +1,11 @@ #!/bin/ash +# Give it some time, in case starting the session fails. +# In that case, vmchooser will send us a SIGTERM, which will +# hopefully happen within one second, so we wont't execute +# all the sessionstart hooks. +sleep 1 + SOURCEPATH="/opt/openslx/vmchooser/sessionstart.d" if [ -d "$SOURCEPATH" ]; then -- cgit v1.2.3-55-g7522