mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
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:
parent
8baedc4f58
commit
ac6c1b2e76
5 changed files with 12 additions and 8 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,6 +1,10 @@
|
||||||
byobu (2.57) unreleased; urgency=low
|
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
|
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 09 Feb 2010 00:07:27 -0600
|
||||||
|
|
||||||
|
|
4
debian/postinst
vendored
4
debian/postinst
vendored
|
@ -7,9 +7,9 @@ PKG="byobu"
|
||||||
|
|
||||||
db_get byobu/launch-by-default
|
db_get byobu/launch-by-default
|
||||||
if [ "$RET" = true ]; then
|
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
|
else
|
||||||
rm -f /etc/profile.d/95-$PKG.sh
|
rm -f /etc/profile.d/Z98-$PKG.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The target of the diversion somehow disappeared which will cause
|
# The target of the diversion somehow disappeared which will cause
|
||||||
|
|
|
@ -501,7 +501,7 @@ def autolaunch():
|
||||||
return 0
|
return 0
|
||||||
if commands.getoutput('grep -qs byobu-launcher %s/.profile' % HOME):
|
if commands.getoutput('grep -qs byobu-launcher %s/.profile' % HOME):
|
||||||
return 1
|
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 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then
|
if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then
|
||||||
if [ -r "$HOME/.byobu/disable-exec" ]; then
|
if echo $- | grep -qs i; then
|
||||||
/usr/bin/byobu
|
/usr/bin/byobu
|
||||||
else
|
else
|
||||||
exec /usr/bin/byobu
|
exec /usr/bin/byobu
|
||||||
|
|
|
@ -26,11 +26,11 @@ remove_launcher() {
|
||||||
sed -i "/$PKG-launcher$/d" "$dest"
|
sed -i "/$PKG-launcher$/d" "$dest"
|
||||||
sed -i "/screen-launcher$/d" "$dest"
|
sed -i "/screen-launcher$/d" "$dest"
|
||||||
fi
|
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
|
for i in ".profile" ".bashrc" ".bash_profile" ".zprofile"; do
|
||||||
remove_launcher "$HOME/$i"
|
remove_launcher "$HOME/$i"
|
||||||
done
|
done
|
||||||
|
touch "$HOME/.$PKG/disable-autolaunch"
|
||||||
|
# install disabled motd printing; re-enable
|
||||||
|
rm -f "$HOME"/.hushlogin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue