On Wednesday 21 December 2011 12:26:32 pavel pocheptsov wrote:
> Hello misc.
> In old release of OBSD to start daemons with system was used rc.local.
> For example:
> if [ -x /usr/local/bin/mysqld_safe ] ; then
>    su -c _mysql root -c '/usr/local/bin/mysqld_safe >/dev/null 2>&1 &'
>    echo -n ' mysql'
>  fi
>
> In 5.0 have changes described here:
> http://www.openbsd.org/faq/faq10.html#rc and in man rc.d and rc.conf.local.
> The questions is how to start mysqld_safe or cupsd or any other daemon,
> that was placed in /etc/rc.d?
> Add the lines to rc.conf.local like this:
> pkg_scripts="cupsd"
> pkg_scripts="mysqld"
>
> or something else?

I'd like to point out that the latter line will overwrite what was inside 
$pkg_scripts varible before that, so your example would only start mysqld.

You need to use the format that Antoine gave or include the previous value of 
the variable when assigning:

pkg_scripts="$pkg_scripts cupsd" # not really necessary on the first item
pkg_scripts="$pkg_scripts mysqld"

-- 
Antti Harri

Reply via email to