]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph: check if /lib/lsb/init-functions exists 7797/head
authorYan, Zheng <zyan@redhat.com>
Thu, 23 Jul 2015 07:07:45 +0000 (15:07 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 3 Mar 2016 08:12:40 +0000 (09:12 +0100)
On OSX/FreeBSD, /lib/lsb/init-functions does not exist

Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit bb1fa7f3993dfcd1243b2a9a0bb432c269df215f)

src/init-ceph.in

index f7acccaf39466e817ca04a04f52e278a95493f96..e4cea7ef17e56290e87fb77f574c9d7b2b852494 100644 (file)
 # Description:       Enable Ceph distributed file system services.
 ### END INIT INFO
 
-. /lib/lsb/init-functions
+# TODO: on FreeBSD/OSX, use equivalent script file
+if [ -e /lib/lsb/init-functions ]; then
+    . /lib/lsb/init-functions
+fi
 
 # detect systemd, also check whether the systemd-run binary exists
 SYSTEMD_RUN=$(which systemd-run 2>/dev/null)