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 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 -- 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"): for s in output.split("\n"):
sys.stdout.write(" %d. %s\n" % (i, s)) sys.stdout.write(" %d. %s\n" % (i, s))
i += 1 i += 1
sys.stdout.write(" %d. Create a new session\n" % i)
i += 1
try: try:
choice = input("\nChoose [1-%d]: " % (i-1)) choice = input("\nChoose 1-%d [1]: " % (i-1))
if choice < 1 or choice >= i: if choice < 1 or choice >= i:
choice = "" choice = ""
except: except:

View file

@ -57,8 +57,8 @@ for i in $SERVICES; do
else else
max="$MAX_CORES" max="$MAX_CORES"
fi fi
count=$(pgrep -c -f /usr/bin/kvm) count=$(pgrep -c -f /usr/bin/kvm || true)
output="$output,NC ($count/$max)" output="$output,NC $count/$max"
fi fi
;; ;;
*) *)