On Tue, 21 Jul 2009 09:46:47 +0100, chris scott <[email protected]> wrote:
> can i use backticks in rc.conf?

Basically, yes. The /etc/rc.conf file is run through sh, it is
a shell script that assigns values to variables, but can (ab)use
it to execute programs.


> rsyncd_flags="--config=/etc/rsyncd.conf --address="` ifconfig bce1 | grep
> inet | awk '{print $2}'`
> 
> it works fine from the shell, however on reboot the address section doesnt
> expand, or rather it goes blank

You should use the full pathnames leading to ifconfig, grep, and awk.
Make sure they are accessible when rc.conf is "executed".



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to