From 9c7a333c690c48c9a1e70e47f08bdab00598ce8b Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 2 Mar 2009 17:32:51 -0600 Subject: [PATCH] * debian/postinst, debian/prerm: add/remove symlink for bin scripts to /var/lib/screen-profiles (should be removed before Jaunty GA) * profiles/common, debian/install: install helper scripts into /var/lib/screen-profiles rather than /usr/share/screen-profiles/bin, LP: #336961 --- debian/changelog | 7 ++++++- debian/install | 22 +++++++++++----------- debian/postinst | 11 +++++++++++ debian/prerm | 8 ++++++++ profiles/common | 22 +++++++++++----------- 5 files changed, 47 insertions(+), 23 deletions(-) create mode 100644 debian/postinst create mode 100644 debian/prerm diff --git a/debian/changelog b/debian/changelog index 40106fa7..011fb14d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,13 @@ screen-profiles (1.32-0ubuntu1) jaunty; urgency=low * bin/ec2-cost: since route -n is being used, must grep for 0.0.0.0, LP: #336955 + * debian/postinst, debian/prerm: add/remove symlink for bin scripts to + /var/lib/screen-profiles (should be removed before Jaunty GA) + * profiles/common, debian/install: install helper scripts into + /var/lib/screen-profiles rather than /usr/share/screen-profiles/bin, + LP: #336961 - -- Dustin Kirkland Mon, 02 Mar 2009 16:28:57 -0600 + -- Dustin Kirkland Mon, 02 Mar 2009 17:27:13 -0600 screen-profiles (1.31-0ubuntu1) jaunty; urgency=low diff --git a/debian/install b/debian/install index 0031580a..1bfe1110 100644 --- a/debian/install +++ b/debian/install @@ -1,14 +1,14 @@ -bin/cpu-count usr/share/screen-profiles/bin -bin/cpu-freq usr/share/screen-profiles/bin -bin/ec2-cost usr/share/screen-profiles/bin -bin/hostname usr/share/screen-profiles/bin -bin/load-average usr/share/screen-profiles/bin -bin/mem-available usr/share/screen-profiles/bin -bin/mem-used usr/share/screen-profiles/bin -bin/reboot-required usr/share/screen-profiles/bin -bin/release usr/share/screen-profiles/bin -bin/updates-available usr/share/screen-profiles/bin -bin/whoami usr/share/screen-profiles/bin +bin/cpu-count var/lib/screen-profiles +bin/cpu-freq var/lib/screen-profiles +bin/ec2-cost var/lib/screen-profiles +bin/hostname var/lib/screen-profiles +bin/load-average var/lib/screen-profiles +bin/mem-available var/lib/screen-profiles +bin/mem-used var/lib/screen-profiles +bin/reboot-required var/lib/screen-profiles +bin/release var/lib/screen-profiles +bin/updates-available var/lib/screen-profiles +bin/whoami var/lib/screen-profiles profiles/common usr/share/screen-profiles/profiles profiles/plain usr/share/screen-profiles/profiles profiles/ubuntu-* usr/share/screen-profiles/profiles diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 00000000..fe4f7047 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,11 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + # This is a hack that should be removed just before Jaunty goes GA. + # We have moved these helper scripts from /usr/share to /var/lib, but if the + # user is upgrading from within an existing screen session depending on the old + # paths, we're going to break their status bar. + ln -sf /var/lib/screen-profiles /usr/share/screen-profiles/bin +fi + +#DEBHELPER# diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 00000000..475ea18b --- /dev/null +++ b/debian/prerm @@ -0,0 +1,8 @@ +#!/bin/sh -e + +if [ "$1" = "remove" ]; then + # This is a hack that should be removed just before Jaunty goes GA. + [ -L /usr/share/screen-profiles/bin ] && rm -f /usr/share/screen-profiles/bin +fi + +#DEBHELPER# diff --git a/profiles/common b/profiles/common index 1495b61f..16e06ecc 100644 --- a/profiles/common +++ b/profiles/common @@ -25,17 +25,17 @@ vbell off msgwait 1 # Define status commands -backtick 100 3600 3600 /usr/share/screen-profiles/bin/release -backtick 101 60 60 /usr/share/screen-profiles/bin/updates-available -backtick 102 2 2 /usr/share/screen-profiles/bin/reboot-required -backtick 103 2 2 /usr/share/screen-profiles/bin/cpu-freq -backtick 104 3600 3600 /usr/share/screen-profiles/bin/cpu-count -backtick 105 3600 3600 /usr/share/screen-profiles/bin/mem-available -backtick 106 2 2 /usr/share/screen-profiles/bin/load-average -backtick 107 2 2 /usr/share/screen-profiles/bin/mem-used -backtick 108 600 600 /usr/share/screen-profiles/bin/ec2-cost -backtick 109 3600 3600 /usr/share/screen-profiles/bin/hostname -backtick 110 3600 3600 /usr/share/screen-profiles/bin/whoami +backtick 100 3600 3600 /var/lib/screen-profiles/release +backtick 101 60 60 /var/lib/screen-profiles/updates-available +backtick 102 2 2 /var/lib/screen-profiles/reboot-required +backtick 103 2 2 /var/lib/screen-profiles/cpu-freq +backtick 104 3600 3600 /var/lib/screen-profiles/cpu-count +backtick 105 3600 3600 /var/lib/screen-profiles/mem-available +backtick 106 2 2 /var/lib/screen-profiles/load-average +backtick 107 2 2 /var/lib/screen-profiles/mem-used +backtick 108 600 600 /var/lib/screen-profiles/ec2-cost +backtick 109 3600 3600 /var/lib/screen-profiles/hostname +backtick 110 3600 3600 /var/lib/screen-profiles/whoami hardstatus alwayslastline