mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
usr/bin/byobu, usr/bin/byobu-janitor,
usr/share/byobu/profiles/common: change location of $SSH_AUTH_SOCK symlink from /var/run to $HOME, as we can't be sure that the user's var/run dir will exist before screen starts, LP: #664059
This commit is contained in:
parent
6c2f51fbda
commit
150dc583b7
4 changed files with 17 additions and 14 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -19,6 +19,10 @@ byobu (3.7) unreleased; urgency=low
|
|||
* README: add a note about gsed
|
||||
* usr/share/man/man1/byobu.1: add a synopsis section that mentions options
|
||||
simply passed through to screen, LP: #669566
|
||||
* usr/bin/byobu, usr/bin/byobu-janitor,
|
||||
usr/share/byobu/profiles/common: change location of $SSH_AUTH_SOCK symlink
|
||||
from /var/run to $HOME, as we can't be sure that the user's var/run
|
||||
dir will exist before screen starts, LP: #664059
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 21 Oct 2010 12:09:14 -0500
|
||||
|
||||
|
|
|
@ -68,10 +68,10 @@ grep -qs "^[^#]" "$BYOBU_WINDOWS" && DEFAULT_WINDOW= || DEFAULT_WINDOW="shell"
|
|||
# Check if our terminfo supports 256 colors
|
||||
$(which tput >/dev/null) && [ $(tput colors 2>/dev/null || echo 0) -eq 256 ] && SCREEN_TERM="-T screen-256color"
|
||||
|
||||
# Create or update ssh-agent socket
|
||||
if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
|
||||
rm -f "$RUN/$PKG.ssh-agent"
|
||||
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
|
||||
# Drop a symlink to the ssh socket in $HOME, since we can ensure that exists
|
||||
if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ]; then
|
||||
rm -f "$HOME/.$PKG/.ssh-agent"
|
||||
ln -sf "$SSH_AUTH_SOCK" "$HOME/.$PKG/.ssh-agent"
|
||||
fi
|
||||
|
||||
PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/byoburc"
|
||||
|
|
|
@ -25,9 +25,6 @@ PKG="byobu"
|
|||
RUN="$SOCKETDIR/S-$USER"
|
||||
FLAG="$RUN/$PKG.reload-required"
|
||||
|
||||
# Use gsed on non-Linux OS's
|
||||
which gsed 2>/dev/null && SED="gsed" || SED="sed"
|
||||
|
||||
# Exit immediately, if we're not forced, and there is no reload flag
|
||||
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
|
||||
exit 0
|
||||
|
@ -36,12 +33,8 @@ fi
|
|||
# Set the rest of the variables
|
||||
DEFAULT_PROFILE="light"
|
||||
PROFILE="$HOME/.$PKG/profile"
|
||||
|
||||
# Establish ssh-agent socket, helps when reconnecting to a detached session
|
||||
if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
|
||||
rm -f "$RUN/$PKG.ssh-agent"
|
||||
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
|
||||
fi
|
||||
# Use gsed on non-Linux OS's
|
||||
which gsed 2>/dev/null && SED="gsed" || SED="sed"
|
||||
|
||||
# Create byobu-exchange buffer file, with secure permissions, if it doesn't exist
|
||||
if [ -w "$RUN" ] && [ ! -e "$RUN/$PKG-exchange" ]; then
|
||||
|
@ -160,5 +153,11 @@ if grep -qs "motd+shell" "$HOME/.$PKG/windows"; then
|
|||
$SED -i -e "s/motd+shell/shell/g" "$HOME/.$PKG/windows" || true
|
||||
fi
|
||||
|
||||
# Affects: Upgrades from <= byobu-3.6, change location of $SSH_AUTH_SOCK
|
||||
if [ -h "$RUN/$PKG.ssh-agent" ]; then
|
||||
rm -f "$HOME/.$PKG/.ssh-agent"
|
||||
mv -f "$RUN/$PKG.ssh-agent" "$HOME/.$PKG/.ssh-agent"
|
||||
fi
|
||||
|
||||
# Clean up flag
|
||||
rm -f "$FLAG"
|
||||
|
|
|
@ -98,7 +98,7 @@ defmonitor on
|
|||
activity ""
|
||||
|
||||
# Maintain SSH_AUTH_SOCK link
|
||||
setenv SSH_AUTH_SOCK /var/run/screen/S-$USER/byobu.ssh-agent
|
||||
setenv SSH_AUTH_SOCK $HOME/.byobu/.ssh-agent
|
||||
|
||||
source $HOME/.byobu/keybindings
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue