From a8e34f83b02f8c8bee5da2799a8bb93c0f0445e3 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Sun, 18 Dec 2011 21:29:40 -0600 Subject: [PATCH] * usr/bin/byobu-janitor: LP: #899271 - sed -i -e changes symlinks to local files, avoid this with readlink --- debian/changelog | 3 ++- usr/bin/byobu-janitor | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0e6bfd62..8af7384a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,9 @@ byobu (4.55) unreleased; urgency=low until we have a better way of detecting it * usr/lib/byobu/menu: LP: #881993 - fix escape key determination - * usr/bin/byobu-janitor: + * usr/bin/byobu-janitor: LP: #899271 - clean up some old upgrade cruft + - sed -i -e changes symlinks to local files, avoid this with readlink [ Will Ellwood ] * usr/lib/byobu/disk: LP: #904824 diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index 7535938c..36dee497 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -76,7 +76,7 @@ for f in status statusrc; do cp -f "$BYOBU_PREFIX/share/$PKG/status/$f" "$BYOBU_CONFIG_DIR/$f" # Enable ec2_cost, if we're in ec2 and seeding a new setup if metadata_available; then - $SED -i -e "s/#ec2_cost/ec2_cost/g" "$BYOBU_CONFIG_DIR/$f" + $SED -i -e "s/#ec2_cost/ec2_cost/g" "$($READLINK -f $BYOBU_CONFIG_DIR/$f)" fi fi done @@ -90,7 +90,7 @@ fi # Affects: Upgrades from <= byobu-2.78 which might have "motd+shell" # in their window list; update this to just "shell" if grep -qs "motd+shell" "$BYOBU_CONFIG_DIR/windows"; then - $SED -i -e "s/motd+shell/shell/g" "$BYOBU_CONFIG_DIR/windows" || true + $SED -i -e "s/motd+shell/shell/g" "$($READLINK -f $BYOBU_CONFIG_DIR/windows)" || true fi # Affects: Upgrades from <= byobu 4.3, remove ec2_rates @@ -98,7 +98,7 @@ rm -f "$BYOBU_CONFIG_DIR/ec2_rates" # Affects: Upgrades from <= byobu 4.4, update "shell" -> "byobu-shell" if grep -qs " shell$" "$BYOBU_CONFIG_DIR/windows"; then - $SED -i -e "s/ shell$/ $PKG-shell/g" "$BYOBU_CONFIG_DIR/windows" || true + $SED -i -e "s/ shell$/ $PKG-shell/g" "$($READLINK -f $BYOBU_CONFIG_DIR/windows)" || true fi # Affects: Upgrades from <= byobu 4.22