From cb421d10e002ee6b6a57c63526ba0e5589775832 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 3 Feb 2010 10:53:54 -0800 Subject: [PATCH] usr/lib/byobu/services: fix eucalyptus-nc service handling, was broken when running no vm's --- debian/changelog | 3 ++- usr/bin/byobu-select-session | 4 +++- usr/lib/byobu/services | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4a669760..3dfbe60e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ byobu (2.51) unreleased; urgency=low - * UNRELEASED + * usr/lib/byobu/services: fix eucalyptus-nc service handling, was + broken when running no vm's -- Dustin Kirkland Wed, 27 Jan 2010 23:09:39 -0600 diff --git a/usr/bin/byobu-select-session b/usr/bin/byobu-select-session index 14c9e1a2..a91e179b 100755 --- a/usr/bin/byobu-select-session +++ b/usr/bin/byobu-select-session @@ -39,8 +39,10 @@ if i > 1: for s in output.split("\n"): sys.stdout.write(" %d. %s\n" % (i, s)) i += 1 + sys.stdout.write(" %d. Create a new session\n" % i) + i += 1 try: - choice = input("\nChoose [1-%d]: " % (i-1)) + choice = input("\nChoose 1-%d [1]: " % (i-1)) if choice < 1 or choice >= i: choice = "" except: diff --git a/usr/lib/byobu/services b/usr/lib/byobu/services index 208c319a..fb805680 100755 --- a/usr/lib/byobu/services +++ b/usr/lib/byobu/services @@ -57,8 +57,8 @@ for i in $SERVICES; do else max="$MAX_CORES" fi - count=$(pgrep -c -f /usr/bin/kvm) - output="$output,NC ($count/$max)" + count=$(pgrep -c -f /usr/bin/kvm || true) + output="$output,NC $count/$max" fi ;; *)