#!/bin/sh # # $FreeBSD: head/devel/hadoop2/files/secondarynamenode.in 364992 2014-08-15 16:20:28Z demon $ # # PROVIDE: secondarynamenode # REQUIRE: LOGIN # KEYWORD: shutdown # # secondarynamenode_enable (bool): Set to NO by default. # Set it to YES to enable secondarynamenode. . /etc/rc.subr export PATH=${PATH}:%%LOCALBASE%%/bin name=secondarynamenode rcvar=secondarynamenode_enable load_rc_config "${name}" : ${secondarynamenode_enable:=NO} : ${secondarynamenode_user:=%%HDFS_USER%%} command="%%PREFIX%%/sbin/hadoop-daemon.sh" command_args='--config %%ETCDIR%% start secondarynamenode' stop_cmd=secondarynamenode_stop secondarynamenode_stop () { su -m ${secondarynamenode_user} -c "${command} --config %%ETCDIR%% stop secondarynamenode" } run_rc_command "$1"