From 206fd37324f3ba5bc83c4af2568a112d84e51cc4 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Sun, 2 Aug 2009 09:56:29 -0500 Subject: [PATCH] * hostname, ip_address, mem_available: make sure statusrc exists before sourcing it, LP: #407478 Signed-off-by: Dustin Kirkland --- bin/hostname | 2 +- bin/ip_address | 2 +- bin/mem_available | 2 +- debian/changelog | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/hostname b/bin/hostname index 94deeef7..cfac02bd 100755 --- a/bin/hostname +++ b/bin/hostname @@ -24,7 +24,7 @@ if [ "$1" = "--detail" ]; then exit 0 fi -. "/etc/$PKG/statusrc" +[ -r "/etc/$PKG/statusrc" ] && . "/etc/$PKG/statusrc" . "$HOME/.$PKG/status" [ "$whoami" = "1" ] && at="@" diff --git a/bin/ip_address b/bin/ip_address index 0a5e3090..9ba54f01 100755 --- a/bin/ip_address +++ b/bin/ip_address @@ -24,7 +24,7 @@ if [ "$1" = "--detail" ]; then exit 0 fi -. "/etc/$PKG/statusrc" +[ -r "/etc/$PKG/statusrc" ] && . "/etc/$PKG/statusrc" . "$HOME/.$PKG/status" [ "$hostname" = "1" ] && space=" " [ "$whoami" = "1" ] && space=" " diff --git a/bin/mem_available b/bin/mem_available index 3d3aa460..7a5b66be 100755 --- a/bin/mem_available +++ b/bin/mem_available @@ -24,7 +24,7 @@ if [ "$1" = "--detail" ]; then exit 0 fi -. "/etc/$PKG/statusrc" +[ -r "/etc/$PKG/statusrc" ] && . "/etc/$PKG/statusrc" . "$HOME/.$PKG/status" [ "$mem_used" = "1" ] && comma="," || whitespace=" " diff --git a/debian/changelog b/debian/changelog index 6f4217c9..6ce4ff8b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ byobu (2.25) unreleased; urgency=low - * UNRELEASED + * hostname, ip_address, mem_available: make sure statusrc exists + before sourcing it, LP: #407478 - -- Dustin Kirkland Wed, 29 Jul 2009 23:54:52 -0500 + + -- Dustin Kirkland Sun, 02 Aug 2009 09:54:39 -0500 byobu (2.24-0ubuntu1) karmic; urgency=low