* usr/lib/byobu/include/common: LP: #911149

- when backend is not automatically set, check if screen or tmux
    is installed on the system before setting the default backend
This commit is contained in:
Dustin Kirkland 2012-01-08 19:06:31 -06:00
commit 63718468cb
2 changed files with 13 additions and 1 deletions

3
debian/changelog vendored
View file

@ -24,6 +24,9 @@ byobu (5.2) unreleased; urgency=low
ctrl-shift-left/right; seems alt-left-right are used by irssi
* README: LP: #911825
- add note about tmux version required
* usr/lib/byobu/include/common: LP: #911149
- when backend is not automatically set, check if screen or tmux
is installed on the system before setting the default backend
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 29 Dec 2011 12:28:51 -0600

View file

@ -27,7 +27,16 @@ if [ -z "${BYOBU_INCLUDED_LIBS}" ]; then
[ -r "/etc/$PKG/backend" ] && . "/etc/$PKG/backend"
[ -r "$BYOBU_CONFIG_DIR/backend" ] && . "$BYOBU_CONFIG_DIR/backend"
# Just in case there's no config file at all
[ -z "${BYOBU_BACKEND}" ] && BYOBU_BACKEND=tmux
if [ -z "${BYOBU_BACKEND}" ]; then
# If tmux is installed, use it
if command -v tmux >/dev/null; then
BYOBU_BACKEND=tmux
elif command -v screen >/dev/null; then
BYOBU_BACKEND=screen
else
echo "ERROR: $PKG won't work without tmux or screen installed" 1>&2
fi
fi
fi
# Creating backend cache