projects
/
grml-scripts-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump Standards-Version to 3.9.2.
[grml-scripts-core.git]
/
usr_bin
/
grml-screen
diff --git
a/usr_bin/grml-screen
b/usr_bin/grml-screen
index
500e89b
..
b455b62
100755
(executable)
--- a/
usr_bin/grml-screen
+++ b/
usr_bin/grml-screen
@@
-4,7
+4,6
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Sam Feb 17 12:15:05 CET 2007 [mika]
################################################################################
# export variable USER for use withing GNU screen:
################################################################################
# export variable USER for use withing GNU screen:
@@
-15,16
+14,22
@@
sudo chmod 660 $TTY
sudo chown $USER.tty $TTY
sudo chmod 660 $TTY
sudo chown $USER.tty $TTY
+# try to mitigate raceconditions from screen
+SCREENDIR_="/var/run/screen"
+if [ `id -u` = 0 ] ; then
+ mkdir -m 755 $SCREENDIR_ >/dev/null 2>& 1 && chgrp utmp $SCREENDIR_
+fi
+mkdir -m 700 "${SCREENDIR_}/S-$USER" >/dev/null 2>&1
+
# now run screen with config
cd $HOME # important for e.g. hardcopy-feature
# now run screen with config
cd $HOME # important for e.g. hardcopy-feature
- # do we have a utf8 enabled terminal?
- [ -x /usr/bin/vt-is-UTF8 ] && /usr/bin/vt-is-UTF8 && UTF='-U'
+
if [ `id -u` = 0 ] ; then
if [ `id -u` = 0 ] ; then
- exec screen
$UTF
-c /etc/grml/screenrc
+ exec screen
-U
-c /etc/grml/screenrc
elif [ -r "$HOME/.screenrc" ] ; then
elif [ -r "$HOME/.screenrc" ] ; then
- exec screen
$UTF
-c "$HOME/.screenrc"
+ exec screen
-U
-c "$HOME/.screenrc"
else
else
- exec screen
$UTF
-c /etc/grml/screenrc_grml
+ exec screen
-U
-c /etc/grml/screenrc_grml
fi
## END OF FILE #################################################################
fi
## END OF FILE #################################################################