mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
usr/bin/byobu: support attaching to an existing ssh agent on first
launch of byobu, LP: #528967
This commit is contained in:
parent
f4bd9ff3f6
commit
1a3bfbf4ed
2 changed files with 7 additions and 5 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -5,6 +5,8 @@ byobu (2.60) unreleased; urgency=low
|
||||||
usr/share/byobu/ec2/rates.us_va: LP: #531497
|
usr/share/byobu/ec2/rates.us_va: LP: #531497
|
||||||
- update ec2 pricing model, allow for local overrides of prices
|
- update ec2 pricing model, allow for local overrides of prices
|
||||||
via a sourced symlink or bespoke file in $HOME/.byobu/ec2_rates
|
via a sourced symlink or bespoke file in $HOME/.byobu/ec2_rates
|
||||||
|
* usr/bin/byobu: support attaching to an existing ssh agent on first
|
||||||
|
launch of byobu, LP: #528967
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 26 Feb 2010 10:43:00 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 26 Feb 2010 10:43:00 -0600
|
||||||
|
|
||||||
|
|
|
@ -46,17 +46,17 @@ grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="mot
|
||||||
|
|
||||||
# Now let's execute screen!
|
# Now let's execute screen!
|
||||||
if [ "$#" = "0" ]; then
|
if [ "$#" = "0" ]; then
|
||||||
|
# Create or update ssh-agent socket
|
||||||
|
if [ -S "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
|
||||||
|
rm -f "$RUN/$PKG.ssh-agent"
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
|
||||||
|
fi
|
||||||
out=$(screen -wipe 2>/dev/null) || true
|
out=$(screen -wipe 2>/dev/null) || true
|
||||||
if echo "$out" | grep -qsi "^No Sockets found in "; then
|
if echo "$out" | grep -qsi "^No Sockets found in "; then
|
||||||
# Start new session
|
# Start new session
|
||||||
exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" -t shell $DEFAULT_WINDOW
|
exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" -t shell $DEFAULT_WINDOW
|
||||||
else
|
else
|
||||||
# Select and attach to an existing session
|
# Select and attach to an existing session
|
||||||
# Update ssh-agent socket
|
|
||||||
if [ -S "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
|
|
||||||
rm -f "$RUN/$PKG.ssh-agent"
|
|
||||||
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
|
|
||||||
fi
|
|
||||||
exec byobu-select-session
|
exec byobu-select-session
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue