git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sanity check path rules with embedded variables.
[profile.git]
/
.profile.d
/
screen.bashrc
diff --git
a/.profile.d/screen.bashrc
b/.profile.d/screen.bashrc
index
ca08f6e
..
440395e
100644
(file)
--- a/
.profile.d/screen.bashrc
+++ b/
.profile.d/screen.bashrc
@@
-1,9
+1,13
@@
# Fixup screen and define ``session'' if available.
screen=$(find_working screen 2>/dev/null)
if [ $? = 0 ]; then
# Fixup screen and define ``session'' if available.
screen=$(find_working screen 2>/dev/null)
if [ $? = 0 ]; then
- # Override SCREENDIR iff screen is not setuid.
+ # Override SCREENDIR iff screen is not setuid
(but not under sudo)
.
if ! ls -l "$screen" | cut -d ' ' -f 1 | grep s >/dev/null; then
if ! ls -l "$screen" | cut -d ' ' -f 1 | grep s >/dev/null; then
- export SCREENDIR="$HOME/.screen/$HOSTNAME"
+ if [ -n "$SUDO_USER" ]; then
+ unset SCREENDIR
+ else
+ export SCREENDIR="${PROFILE_HOME:-~}/.screen/$HOSTNAME"
+ fi
fi
krenew=$(find_working krenew 2/dev/null)
fi
krenew=$(find_working krenew 2/dev/null)