diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2014-06-21 02:00:23 -0700 |
---|---|---|
committer | Harshavardhana <harsha@harshavardhana.net> | 2014-07-02 17:20:34 -0700 |
commit | 1b74cf992986287a510fe3b28a8ee7554e8b0992 (patch) | |
tree | a5fad911274080947f5874b4d90cc4f67b6f4473 /extras/init.d | |
parent | e4a3566681acbadfe0f7bd879443116885ada4eb (diff) |
porting: Port for FreeBSD rebased from Mike Ma's efforts
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD
Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma <mikemandarine@gmail.com>
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras/init.d')
-rw-r--r-- | extras/init.d/Makefile.am | 8 | ||||
-rw-r--r-- | extras/init.d/glusterd-FreeBSD.in | 24 |
2 files changed, 28 insertions, 4 deletions
diff --git a/extras/init.d/Makefile.am b/extras/init.d/Makefile.am index 38898fddd2e..61dde2d396e 100644 --- a/extras/init.d/Makefile.am +++ b/extras/init.d/Makefile.am @@ -1,13 +1,13 @@ -EXTRA_DIST = glusterd-Debian glusterd-Redhat glusterd-SuSE glusterd.plist rhel5-load-fuse.modules +EXTRA_DIST = glusterd-Debian glusterd-FreeBSD glusterd-Redhat glusterd-SuSE glusterd.plist rhel5-load-fuse.modules -CLEANFILES = +CLEANFILES = INIT_DIR = @initdir@ SYSTEMD_DIR = @systemddir@ LAUNCHD_DIR = @launchddir@ -$(GF_DISTRIBUTION): +$(GF_DISTRIBUTION): @if [ ! -d $(SYSTEMD_DIR) ]; then \ $(mkdir_p) $(DESTDIR)$(INIT_DIR); \ $(INSTALL_PROGRAM) glusterd-$(GF_DISTRIBUTION) $(DESTDIR)$(INIT_DIR)/glusterd; \ @@ -15,7 +15,7 @@ $(GF_DISTRIBUTION): install-exec-local: $(GF_DISTRIBUTION) -install-data-local: +install-data-local: if GF_DARWIN_HOST_OS $(mkdir_p) $(DESTDIR)$(LAUNCHD_DIR) $(INSTALL_PROGRAM) glusterd.plist $(DESTDIR)$(LAUNCHD_DIR)/com.gluster.glusterd.plist diff --git a/extras/init.d/glusterd-FreeBSD.in b/extras/init.d/glusterd-FreeBSD.in new file mode 100644 index 00000000000..5eed6360a89 --- /dev/null +++ b/extras/init.d/glusterd-FreeBSD.in @@ -0,0 +1,24 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: glusterd + +. /etc/rc.subr + +name="glusterd" +rcvar=`set_rcvar` +command=@prefix@/sbin/${name} +pidfile="/var/run/${name}.pid" +glusterd_flags="-p /var/run/${name}.pid" +start_precmd="glusterd_prestart" + +glusterd_prestart() +{ + mkdir -p /var/lib/glusterd /var/log/glusterfs + return 0 +} + +load_rc_config $name +run_rc_command "$1" |