]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
server: User temporary RUN_DIR in $HOME does not exist
authorMichal Sojka <michal.sojka@cvut.cz>
Mon, 18 Nov 2019 08:20:28 +0000 (09:20 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 18 Nov 2019 08:20:28 +0000 (09:20 +0100)
This is the case under pbuilder.

server/novaboot-shell

index 52c70e47b95fe71e96fdbf68f677cfd981ee4275..a9300b725f9f26f9c248824b02673d45862a9454 100755 (executable)
@@ -166,7 +166,12 @@ main() {
     esac
 }
 
-RUN_DIR="$HOME"
+if [ -d "$HOME" ]; then
+    RUN_DIR="$HOME"
+else
+    RUN_DIR="/tmp/novaboot-shell@$USER"
+    mkdir -p "$RUN_DIR"
+fi
 
 if [ -z "$NOVABOOT_ID" ]; then
     main "$@"