]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
debian: only start/stop upstart jobs if upstart is present
authorSage Weil <sage@inktank.com>
Tue, 30 Apr 2013 00:01:55 +0000 (17:01 -0700)
committerSage Weil <sage@inktank.com>
Tue, 30 Apr 2013 00:01:55 +0000 (17:01 -0700)
This avoids errors on non-upstart distros (like wheezy).

Signed-off-by: Sage Weil <sage@inktank.com>
debian/ceph-mds.postinst
debian/ceph-mds.prerm
debian/ceph.postinst
debian/ceph.prerm

index dfe02d2308ef21f96b09a391164807866bc5bbb3..7fcbf5c623046ea9b40266b28152eb990595dc9d 100644 (file)
@@ -20,7 +20,7 @@ set -e
 
 case "$1" in
     configure)
-       start ceph-mds-all || :
+       [ -x /sbin/start ] && start ceph-mds-all || :
     ;;
     abort-upgrade|abort-remove|abort-deconfigure)
        :
index 56d9e0128f1049e0fab7242a40a8f76502120187..c4af0994d948260ee4bea9df2a5aa49ec002dc52 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
-stop ceph-mds-all || :
+[ -x /sbin/stop ] && stop ceph-mds-all || :
 
 exit 0
\ No newline at end of file
index 4edbf10d93b6428be9ca9e605f1ca8bf14976cf8..090a91aa9bb3bbe6810077b75ef9aa2e007f67c0 100644 (file)
@@ -27,7 +27,7 @@ set -e
 case "$1" in
     configure)
        rm -f /etc/init/ceph.conf
-       start ceph-all || :
+       [ -x /sbin/start ] && start ceph-all || :
     ;;
     abort-upgrade|abort-remove|abort-deconfigure)
        :
index 159a96e33c391fa0229603f5da7d0cdbb01a49c6..557a1dbdac052215933bcab702a50f39dc92b89e 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
-stop ceph-all || :
+[ -x /sbin/stop ] && stop ceph-all || :
 
 exit 0
\ No newline at end of file