Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2011 16:45:05 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        Christer Edwards <christer.edwards@gmail.com>
Cc:        "freebsd-ports@FreeBSD.org" <freebsd-ports@freebsd.org>, Ruslan Mahmatkhanov <cvs-src@yandex.ru>
Subject:   salt rc.d scripts (Was: RUN_DEPENDS for python based port)
Message-ID:  <4EF3CF11.6070104@FreeBSD.org>
In-Reply-To: <CAH2d3%2Btd83z%2Bb0UG%2BH8%2BFmCe-A=dk1FAYd6k=1J43GrybyHsng@mail.gmail.com>
References:  <CAH2d3%2BvMF8jM6GHJQ6DR7EywmnY%2Bj=0tSHFEf_5oW1C6QhYD8A@mail.gmail.com> <4EEC6D9D.1020102@yandex.ru> <CAH2d3%2Btr8deqeGLPywXAXsRDPt_-3GwpkqPhK=zk5PtztvkK6g@mail.gmail.com> <4EEEAE03.1080908@yandex.ru> <CAH2d3%2BtE8s%2Bf6ni9GLdh0nHTQdN50BeaoAQ6%2BnYTrUBbJAiKDA@mail.gmail.com> <4EF2FBAE.8050406@yandex.ru> <CAH2d3%2BvWDbahx_kuo9_T8ezK2W9JGxyy74czeUTDopKKUzrQfg@mail.gmail.com> <4EF393BC.2020003@yandex.ru> <CAH2d3%2Bs1Tkizqoa5-spY92A82fgXxJ1m53Or4Fb5SPGhZKG4iw@mail.gmail.com> <CAH2d3%2Btd83z%2Bb0UG%2BH8%2BFmCe-A=dk1FAYd6k=1J43GrybyHsng@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------000907000605080900050601
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 12/22/2011 16:32, Christer Edwards wrote:

> I must have horrible luck or something, but I've put together rc
> scripts and they don't work. This port sure is giving me a hard time!
> 
> Here is a link to the updated archive with the .sample suggestions
> applied as well as the rc scripts. Can anyone see what is wrong with
> them? I simply get complains that it isn't toggled to YES in the
> rc.conf, but it is..

Can you paste the actual error that you're getting, and the output of
'grep salt /etc/rc.conf /etc/rc.conf.local' please?

I reviewed your scripts, and there is nothing that should cause the
error you're describing. I even tried with and without
salt_master_enable in rc.conf and got the expected results for both.

There are some style problems and one real bug that are repeated for all
3 scripts. I attached a fixed version of one of them, hopefully that
will help you see what's needed to fix the other 2. Also, please review
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html,
especially the pre-commit checklist.


hth,

Doug

-- 

		[^L]

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


--------------000907000605080900050601
Content-Type: text/plain;
 name="salt-master.in"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="salt-master.in"

#!/bin/sh

# $FreeBSD$
#
# Salt Master startup script
#
# PROVIDE: salt-master
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following to /etc/rc.conf[.local] to enable this service
#
# salt_master_enable="YES"

. /etc/rc.subr

name="salt-master"
rcvar="salt_master_enable"

load_rc_config ${name}

: ${salt_master_enable:="NO"}

command="%%PREFIX%%/bin/${name}"
pidfile="/var/run/${name}.pid"
required_files="%%PREFIX%%/etc/salt/master"
command_args="-c $required_files -d"

run_rc_command "$1"

--------------000907000605080900050601--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EF3CF11.6070104>