mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* debian/postinst, usr/bin/byobu-janitor:
- smooth upgrades from older byobu (<= 4.0)
This commit is contained in:
parent
28d0e6a530
commit
e2b8e7cf79
3 changed files with 23 additions and 8 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -3,6 +3,8 @@ byobu (4.35) unreleased; urgency=low
|
|||
* usr/bin/byobu-janitor, usr/share/byobu/status/status: LP: #856467
|
||||
- cleaner fix for ensuring ec2_cost is enabled in ec2 instances;
|
||||
previous fix just enabled it everywhere
|
||||
* debian/postinst, usr/bin/byobu-janitor:
|
||||
- smooth upgrades from older byobu (<= 4.0)
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 21 Sep 2011 18:49:00 -0500
|
||||
|
||||
|
|
19
debian/postinst
vendored
19
debian/postinst
vendored
|
@ -25,14 +25,21 @@ fi
|
|||
rm -f /etc/update-motd.d/55-window-manager
|
||||
|
||||
# Notify users that they should reload their profile
|
||||
touch_flag() {
|
||||
touch "$1"
|
||||
chown --reference $(dirname "$1") "$1" || true
|
||||
chmod 700 "$1"
|
||||
}
|
||||
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir"
|
||||
if [ -d "$SOCKETDIR" ]; then
|
||||
for d in "$SOCKETDIR"/*/"$PKG"; do
|
||||
[ -d "$d" ] || continue
|
||||
flag="$d/reload-required"
|
||||
touch "$flag"
|
||||
chown --reference "$d" "$flag" || true
|
||||
chmod 700 "$flag"
|
||||
for d in "$SOCKETDIR"/*; do
|
||||
if [ -d "$d/$PKG" ]; then
|
||||
# New location of the reload flag
|
||||
touch_flag "$d/$PKG/reload-required"
|
||||
elif [ -d "$d" ]; then
|
||||
# Old location of the reload flag
|
||||
touch_flag "$d/$PKG.reload-required"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
|
@ -46,6 +46,12 @@ if [ -d "$BYOBU_CONFIG_DIR" ] && [ ! -w "$BYOBU_CONFIG_DIR" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Affects: Upgrades from <= byobu 4.30
|
||||
# Clear out old style status configuration
|
||||
if ! grep -qs "^screen_upper_left=" "$BYOBU_CONFIG_DIR/status"; then
|
||||
rm -f "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc"
|
||||
fi
|
||||
|
||||
# Affects: First runs with no configuration
|
||||
# Seed the configuration
|
||||
# Setup initial local user configuration
|
||||
|
@ -127,7 +133,7 @@ fi
|
|||
# Affects: Upgrades from <= byobu 4.22
|
||||
killall -u $USER byobu-statusd >/dev/null 2>&1 || true
|
||||
|
||||
# Clean up flag
|
||||
rm -f "$FLAG"
|
||||
# Clean up flag (new and old)
|
||||
rm -f "$FLAG" "/var/run/screen/S-$USER/$PKG.reload-required"
|
||||
|
||||
# vi: syntax=sh ts=4 noexpandtab
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue