summaryrefslogtreecommitdiffstats
path: root/lib/session.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-10-07 13:13:33 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-10-07 13:13:33 (EDT)
commitdea2e9719dbc7b855292e227696497d8a893193b (patch)
tree099b9c780ce6602414fcc03c7f026536f6169d62 /lib/session.sh
parente110fb741bb16bb3c24253d63a259d2a19ee48c3 (diff)
session_begin(): Check for /prokit/installing
Diffstat (limited to 'lib/session.sh')
-rw-r--r--lib/session.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/session.sh b/lib/session.sh
index 5aad176..64954b5 100644
--- a/lib/session.sh
+++ b/lib/session.sh
@@ -39,6 +39,7 @@ session_begin()
local root="${1}"
local mountdir="${2}"
local atexit="${3}"
+ local installing="${4}"
rand
session_id=${rand_x}
@@ -49,6 +50,9 @@ session_begin()
session_atexit="${atexit}"
[ -d "${session_root}/prokit" ] || mkdir "${session_root}/prokit"
+ if [ -f "${session_root}/prokit/installing" ] && ! ${installing}; then
+ error 2 "$(get_msg 'install_running')"
+ fi
if ! mutex_lock_timeout "${session_root}/prokit/sessions.lock" 5; then
error 2 "$(get_msg 'cant_lock_sessions')"