From 18dc5687e378ed57c26041b59de5ac2e7e726618 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 22 Apr 2010 12:24:04 -0500 Subject: [PATCH] usr/bin/byobu-launch, usr/bin/byobu-launcher-install, usr/bin/byobu-janitor: exit 0 after launching byobu; this is superior to previously reverted implementations where we exec'd byobu, since we'll only exit 0 if the byobu/screen session exits cleanly; this will keep the user from having to do the double-exit when detaching, LP: #568306 --- debian/changelog | 7 ++++++- usr/bin/byobu-janitor | 5 +++++ usr/bin/byobu-launch | 2 +- usr/bin/byobu-launcher-install | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0e51b952..c4a1e8bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,11 @@ byobu (2.71) unreleased; urgency=low - * UNRELEASED + * usr/bin/byobu-launch, usr/bin/byobu-launcher-install, + usr/bin/byobu-janitor: exit 0 after launching byobu; this is superior + to previously reverted implementations where we exec'd byobu, since + we'll only exit 0 if the byobu/screen session exits cleanly; this will + keep the user from having to do the double-exit when detaching, + LP: #568306 -- Dustin Kirkland Wed, 21 Apr 2010 23:08:18 -0500 diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index be19efbe..71b0f304 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -129,6 +129,11 @@ if [ -h "/etc/profile.d/Z98-$PKG.sh" ]; then sed -i "/$PKG-launcher$/d" "$HOME"/.profile || true fi +# Affects: Upgrades from <= byobu-2.70 that autolaunch +# Update the byobu-launch line, if necessary +if grep -qs "^\`echo \$- | grep -qs i\` && $PKG-launcher$" "$HOME"/.profile; then + $PKG-launcher-uninstall && $PKG-launcher-install +fi # Clean up flag rm -f "$FLAG" diff --git a/usr/bin/byobu-launch b/usr/bin/byobu-launch index 8a22ad53..2b9304ed 100755 --- a/usr/bin/byobu-launch +++ b/usr/bin/byobu-launch @@ -17,4 +17,4 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -`echo \$- | grep -qs i` && byobu-launcher +`echo \$- | grep -qs i` && byobu-launcher && exit 0 diff --git a/usr/bin/byobu-launcher-install b/usr/bin/byobu-launcher-install index f71fb8c6..1214b8aa 100755 --- a/usr/bin/byobu-launcher-install +++ b/usr/bin/byobu-launcher-install @@ -21,7 +21,7 @@ PKG="byobu" install_launcher() { - echo "\`echo \$- | grep -qs i\` && $PKG-launcher" >> "$1" + echo "\`echo \$- | grep -qs i\` && $PKG-launcher && exit 0" >> "$1" } # Sanitize the environment