mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
usr/bin/byobu-launch, usr/bin/byobu-launcher-install: fix handling
of logout behavior, when dpkg-configured globally by the sysadmin, LP: #741281
This commit is contained in:
parent
14affd9b3a
commit
e6c3593588
3 changed files with 19 additions and 1 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -10,6 +10,9 @@ byobu (3.30) unreleased; urgency=low
|
|||
LP: #760696
|
||||
* usr/bin/byobu-launcher: don't disrupt work flow, but rather inform
|
||||
user about launching byobu in a nested screen session, LP: #747649
|
||||
* usr/bin/byobu-launch, usr/bin/byobu-launcher-install: fix handling
|
||||
of logout behavior, when dpkg-configured globally by the sysadmin,
|
||||
LP: #741281
|
||||
|
||||
[ Chaskiel Grundman ]
|
||||
* debian/postinst: correctly fix old-school screen-profiles era diversions
|
||||
|
|
|
@ -17,4 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
case "$-" in *i*) byobu-launcher && exit 0; esac;
|
||||
PKG="byobu"
|
||||
DATA="$HOME/.$PKG"
|
||||
case "$-" in *i*) byobu-launcher; esac;
|
||||
[ -e "$DATA/no-logout-on-detach" ] || exit 0
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
PKG="byobu"
|
||||
DATA="$HOME/.$PKG"
|
||||
FLAG="$DATA/no-logout-on-detach"
|
||||
|
||||
LOGOUT_ON_DETACH=1
|
||||
for i in $@; do
|
||||
|
@ -30,6 +31,14 @@ for i in $@; do
|
|||
esac
|
||||
done
|
||||
|
||||
update_flag() {
|
||||
if [ "$LOGOUT_ON_DETACH" = "1" ]; then
|
||||
rm -f "$FLAG"
|
||||
else
|
||||
touch "$FLAG"
|
||||
fi
|
||||
}
|
||||
|
||||
install_launcher() {
|
||||
if [ "$LOGOUT_ON_DETACH" = "1" ]; then
|
||||
printf "%s\n" 'case "$-" in *i*) byobu-launcher && exit 0; esac;' >> "$1"
|
||||
|
@ -44,6 +53,9 @@ $PKG-launcher-uninstall || true
|
|||
touch "$HOME"/.hushlogin
|
||||
rm -f "$DATA/disable-autolaunch"
|
||||
|
||||
# Update the logout/nologout flag
|
||||
update_flag
|
||||
|
||||
# Handle bourne shells, if not set globally in /etc/profile.d
|
||||
if [ ! -h "/etc/profile.d/Z98-$PKG.sh" ]; then
|
||||
# Install in $HOME/.profile unconditionally
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue