Skip to content

Commit

Permalink
debian: only start/stop upstart jobs if upstart is present
Browse files Browse the repository at this point in the history
This avoids errors on non-upstart distros (like wheezy).

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
Sage Weil committed Apr 30, 2013
1 parent 5d20c39 commit 030bf8a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion debian/ceph-mds.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
:
Expand Down
2 changes: 1 addition & 1 deletion debian/ceph-mds.prerm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

stop ceph-mds-all || :
[ -x /sbin/stop ] && stop ceph-mds-all || :

exit 0
2 changes: 1 addition & 1 deletion debian/ceph.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
:
Expand Down
2 changes: 1 addition & 1 deletion debian/ceph.prerm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

stop ceph-all || :
[ -x /sbin/stop ] && stop ceph-all || :

exit 0

0 comments on commit 030bf8a

Please sign in to comment.