usr/lib/byobu/services: fix eucalyptus-nc service handling, was

broken when running no vm's
This commit is contained in:
Dustin Kirkland 2010-02-03 10:53:54 -08:00
commit cb421d10e0
3 changed files with 7 additions and 4 deletions

3
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Wed, 27 Jan 2010 23:09:39 -0600

View file

@ -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:

View file

@ -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
;;
*)