Set SHELL variable in run-welcome + run-screen
[grml-scripts.git] / usr_share / run-screen
index d101fc6..d04543f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/dash
+#!/bin/sh
 # Filename:      run-screen
 # Purpose:       wrapper for screen to start with appropriate configuration
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
@@ -6,18 +6,19 @@
 # License:       This file is licensed under the GPL v2.
 ################################################################################
 
+export SHELL=/bin/zsh
 # try to mitigate raceconditions from screen
 SCREENDIR_="/var/run/screen"
 mkdir -m 700 "${SCREENDIR_}/S-$USER" >/dev/null 2>&1
 
 # now run screen with config
 
-  if [ `id -u` = 0 ] ; then
-    exec screen -U -c /etc/grml/screenrc
+  if [ "$(id -u)" = 0 ] ; then
+    exec screen -U -c /etc/grml/screenrc -s "-$SHELL"
   elif [ -r "$HOME/.screenrc" ] ; then
-    exec screen -U -c "$HOME/.screenrc"
+    exec screen -U -c "$HOME/.screenrc" -s "-$SHELL"
   else
-    exec screen -U -c /etc/grml/screenrc_generic
+    exec screen -U -c /etc/grml/screenrc_generic -s "-$SHELL"
   fi
 
 ## END OF FILE #################################################################