Export SCREENRC in become.
authorIain Patterson <me@iain.cx>
Tue, 2 Dec 2014 13:25:37 +0000 (13:25 +0000)
committerIain Patterson <me@iain.cx>
Tue, 2 Dec 2014 13:30:12 +0000 (13:30 +0000)
Set SCREENRC in the environment so screen will be configured
appropriately when run under sudo.

opt/bin/become

index ee447c7..d958646 100755 (executable)
@@ -85,6 +85,9 @@ if exec 3>"$file" && exec <"$file" && rm "$file"; then
   else
     echo >&3 "unset DISPLAY"
   fi
+  if [ ! "$PROFILE_HOME" = "$HOME" ]; then
+    echo >&3 "export SCREENRC=$PROFILE_HOME/.screenrc"
+  fi
 else
   exit 111
 fi