debian/postinst, usr/bin/byobu-config, usr/bin/byobu-launcher,

usr/bin/byobu-launcher-uninstall: install the profile.d script
at Z98-* to ensure that it's sourced last-ish; clean up and check
for the new location; check if shell is interactive before exec'ing
in the launcher
This commit is contained in:
Dustin Kirkland 2010-02-09 12:31:39 -06:00
commit ac6c1b2e76
5 changed files with 12 additions and 8 deletions

6
debian/changelog vendored
View file

@ -1,6 +1,10 @@
byobu (2.57) unreleased; urgency=low
* UNRELEASED
* debian/postinst, usr/bin/byobu-config, usr/bin/byobu-launcher,
usr/bin/byobu-launcher-uninstall: install the profile.d script
at Z98-* to ensure that it's sourced last-ish; clean up and check
for the new location; check if shell is interactive before exec'ing
in the launcher
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 09 Feb 2010 00:07:27 -0600

4
debian/postinst vendored
View file

@ -7,9 +7,9 @@ PKG="byobu"
db_get byobu/launch-by-default
if [ "$RET" = true ]; then
ln -sf /usr/bin/$PKG-launcher /etc/profile.d/95-$PKG.sh
ln -sf /usr/bin/$PKG-launcher /etc/profile.d/Z98-$PKG.sh
else
rm -f /etc/profile.d/95-$PKG.sh
rm -f /etc/profile.d/Z98-$PKG.sh
fi
# The target of the diversion somehow disappeared which will cause

View file

@ -501,7 +501,7 @@ def autolaunch():
return 0
if commands.getoutput('grep -qs byobu-launcher %s/.profile' % HOME):
return 1
if os.path.exists("/etc/profile.d/%s.sh" % PKG):
if os.path.exists("/etc/profile.d/Z98-%s.sh" % PKG):
return 1
return 0

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then
if [ -r "$HOME/.byobu/disable-exec" ]; then
if echo $- | grep -qs i; then
/usr/bin/byobu
else
exec /usr/bin/byobu

View file

@ -26,11 +26,11 @@ remove_launcher() {
sed -i "/$PKG-launcher$/d" "$dest"
sed -i "/screen-launcher$/d" "$dest"
fi
touch "$HOME/.$PKG/disable-autolaunch"
# the install disabled motd printing; re-enable
rm -f "$HOME"/.hushlogin
}
for i in ".profile" ".bashrc" ".bash_profile" ".zprofile"; do
remove_launcher "$HOME/$i"
done
touch "$HOME/.$PKG/disable-autolaunch"
# install disabled motd printing; re-enable
rm -f "$HOME"/.hushlogin