rcng, addition to rc.subr
- From: "Frans Haarman" <franshaarman@xxxxxxxxx>
- Date: Fri, 31 Mar 2006 14:39:17 +0200
I am changing /etc/rc.subr. I can now use rc.env.d directories. Each file in the
directory becomes a variable. somewhat like daemontools envdir. It
seemed nice to
include it to rcng.
So with this we can do:
echo 'yes' > rc.env.d/sshd/sshd_enable
Am concidering adding the "$_command'
name to the variables if there is no _ in the file name.
Then we could do:
echo yes > rc.env.d/sshd/enable
Here is the script:
#custom rc.env.d
#used to overide/configure last variables using rc.env.d
if [ -d /data/etc/rc.env.d/"$_command" ]; then
debug "rc.env.d /data/etc/rc.env.d/${_command}"
envd_vars=`ls /data/etc/rc.env.d/"${_command}"` #each file is a var
for envd_file in $envd_vars
do
if [ -f /data/etc/rc.env.d/"$_command"/$envd_file ]; then
export $envd_file=`head -1 /data/etc/rc.env.d/${_command}"/$envd_file`
fi
done
#echo "rc.env.d /data/etc/rc.env.d/${_command}"
fi
Does this look ok to you ?
Regards,
Frans
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- Prev by Date: Re: ipf and ipnat stopped working, no routing between nics.
- Next by Date: p5-GSSAPI-0.20 missing dependency?
- Previous by thread: intel server board: strange LAN problem [SOLVED]
- Next by thread: p5-GSSAPI-0.20 missing dependency?
- Index(es):