]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph: check if /lib/lsb/init-functions exists
authorYan, Zheng <zyan@redhat.com>
Thu, 23 Jul 2015 07:07:45 +0000 (15:07 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 Aug 2015 08:00:24 +0000 (16:00 +0800)
On OSX/FreeBSD, /lib/lsb/init-functions does not exist

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/init-ceph.in

index 22f595ad2b51255b2de5abb1ffb5aa95cd36d42d..4255c550a434dfce73337087715e9acbaf2aa82b 100755 (executable)
 # 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)