Index: Makefile =================================================================== --- Makefile (revision 397673) +++ Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= salt PORTVERSION= 2015.8.0 +PORTREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -56,7 +57,9 @@ --salt-logs-dir=/var/log/salt \ --salt-pidfile-dir=/var/run -USE_RC_SUBR= salt_master \ +USE_RC_SUBR= salt_api \ + salt_proxy \ + salt_master \ salt_minion \ salt_syndic Index: files/pkg-message.in =================================================================== --- files/pkg-message.in (revision 397673) +++ files/pkg-message.in (working copy) @@ -6,6 +6,7 @@ o Copy %%PREFIX%%/etc/salt/master.sample to %%PREFIX%%/etc/salt/master o Update to meet your needs o sysrc salt_master_enable="YES" + o sysrc salt_master_paths="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" --------------------------------------------------------------------------------------------------- @@ -14,6 +15,16 @@ o Copy %%PREFIX%%/etc/salt/minion.sample to %%PREFIX%%/etc/salt/minion o Update 'master: salt' to point to your Salt Master's hostname or IP o sysrc salt_minion_enable="YES" + o sysrc salt_minion_paths="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" +--------------------------------------------------------------------------------------------------- + +To configure a Salt Proxy Minion, do the following: + + o sysrc salt_proxy_enable="YES" + o sysrc salt_proxy_paths="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" + o sysrc salt_proxy_list="" + o Update the salt_proxy_list with the proxy minion name(s) + =================================================================================================== Index: files/salt_api.in =================================================================== --- files/salt_api.in (revision 397673) +++ files/salt_api.in (working copy) @@ -15,12 +15,12 @@ . /etc/rc.subr -name="salt_api" +name=salt_api rcvar=salt_api_enable load_rc_config ${name} -: ${salt_api_enable:="NO"} +: ${salt_api_enable:=NO} command="%%PREFIX%%/bin/salt-api" command_interpreter="%%PYTHON_CMD%%" Index: files/salt_master.in =================================================================== --- files/salt_master.in (revision 397673) +++ files/salt_master.in (working copy) @@ -15,12 +15,14 @@ . /etc/rc.subr -name="salt_master" +name=salt_master rcvar=salt_master_enable load_rc_config ${name} -: ${salt_master_enable:="NO"} +: ${salt_master_enable:=NO} +: ${salt_master_paths=$PATH} +: ${salt_master_eggcache=/tmp} command="%%PREFIX%%/bin/salt-master" command_interpreter="%%PYTHON_CMD%%" @@ -27,4 +29,7 @@ required_files="%%PREFIX%%/etc/salt" command_args="-c ${required_files} -d" +export PATH="${salt_master_paths}" +export PYTHON_EGG_CACHE="${salt_master_eggcache}" + run_rc_command "$1" Index: files/salt_minion.in =================================================================== --- files/salt_minion.in (revision 397673) +++ files/salt_minion.in (working copy) @@ -15,14 +15,14 @@ . /etc/rc.subr -name="salt_minion" +name=salt_minion rcvar=salt_minion_enable load_rc_config ${name} -: ${salt_minion_enable:="NO"} -: ${salt_minion_paths="$PATH"} -: ${salt_minion_eggcache="/tmp"} +: ${salt_minion_enable:=NO} +: ${salt_minion_paths=$PATH} +: ${salt_minion_eggcache=/tmp} command="%%PREFIX%%/bin/salt-minion" command_interpreter="%%PYTHON_CMD%%" Index: files/salt_proxy.in =================================================================== --- files/salt_proxy.in (revision 0) +++ files/salt_proxy.in (working copy) @@ -0,0 +1,53 @@ +#!/bin/sh + +# $FreeBSD$ +# +# Salt Proxy startup script +# +# PROVIDE: salt_proxy +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following to /etc/rc.conf[.local] to enable this service +# +# salt_proxy_enable="YES" +# + +. /etc/rc.subr + +name=salt_proxy +rcvar=salt_proxy_enable + +load_rc_config ${name} + +: ${salt_proxy_enable:=NO} +: ${salt_minion_paths=$PATH} +: ${salt_minion_eggcache=/tmp} +: ${salt_proxy_list=} + +start_cmd=salt_proxy_start + +command="%%PREFIX%%/bin/salt-proxy" +command_interpreter="%%PYTHON_CMD%%" +required_files="%%PREFIX%%/etc/salt" +command_args="-c ${required_files} -d" + +export PATH="${salt_minion_paths}" +export PYTHON_EGG_CACHE="${salt_minion_eggcache}" + +salt_proxy_start() +{ + if [ -n "${salt_proxy_list}" ]; then + echo "${salt_proxy_list} is undefined" + return 1 + fi + + local _proxy + + for _proxy in ${salt_proxy_list}; do + echo "Starting salt-proxy: ${_proxy}" + ${command_interpreter} ${command} --proxyid ${_proxy} ${command_args} + done +} + +run_rc_command "$1" Property changes on: files/salt_proxy.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: files/salt_syndic.in =================================================================== --- files/salt_syndic.in (revision 397673) +++ files/salt_syndic.in (working copy) @@ -15,12 +15,12 @@ . /etc/rc.subr -name="salt_syndic" +name=salt_syndic rcvar=salt_syndic_enable load_rc_config ${name} -: ${salt_syndic_enable:="NO"} +: ${salt_syndic_enable:=NO} command="%%PREFIX%%/bin/salt-syndic" command_interpreter="%%PYTHON_CMD%%"