]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libvirt-guests: status: return non-zero when stopped
authorJán Tomko <jtomko@redhat.com>
Tue, 30 Apr 2013 11:44:33 +0000 (13:44 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 30 Apr 2013 16:38:18 +0000 (18:38 +0200)
Return 3 when the service is stopped, whether there
are saved guests or not, to conform with the LSB standards:

http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

tools/libvirt-guests.sh.in

index 4f2e2035b7402a488a2003c33efecd329d8206ee..261c488d8fbfa56dfa579ea01c1fadfa38005a38 100644 (file)
@@ -524,10 +524,11 @@ rh_status() {
     else
         if [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ]; then
             gettext "started"; echo
+            RETVAL=0
         else
             gettext "stopped, with no saved guests"; echo
+            RETVAL=3
         fi
-        RETVAL=0
     fi
 }