Re: backticks in rc.conf

2009-07-23 Thread Giorgos Keramidas
On Tue, 21 Jul 2009 13:21:04 +0100, RW rwmailli...@googlemail.com wrote: On Tue, 21 Jul 2009 14:18:37 +0300 Giorgos Keramidas keram...@ceid.upatras.gr wrote: There's a catch here that may go unnoticed for a while... rc.conf may be sourced by /etc/rc *long* before filesystems are mounted. As a

Re: backticks in rc.conf

2009-07-21 Thread Polytropon
On Tue, 21 Jul 2009 09:46:47 +0100, chris scott kra...@googlemail.com 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.

Re: backticks in rc.conf

2009-07-21 Thread Giorgos Keramidas
On Tue, 21 Jul 2009 11:29:20 +0200, Polytropon free...@edvax.de wrote: On Tue, 21 Jul 2009 09:46:47 +0100, chris scott kra...@googlemail.com 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,

Re: backticks in rc.conf

2009-07-21 Thread chris scott
2009/7/21 Giorgos Keramidas keram...@ceid.upatras.gr On Tue, 21 Jul 2009 11:29:20 +0200, Polytropon free...@edvax.de wrote: On Tue, 21 Jul 2009 09:46:47 +0100, chris scott kra...@googlemail.com wrote: can i use backticks in rc.conf? Basically, yes. The /etc/rc.conf file is run through

Re: backticks in rc.conf

2009-07-21 Thread Giorgos Keramidas
On Tue, 21 Jul 2009 12:24:09 +0100, chris scott kra...@googlemail.com wrote: a=`echo $ifconfig_bge0 | /usr/bin/awk '{ for ( i=1 ; i = NF; i++) { if ( $i ~ /[iI][nN][eE][tT]/ ) { sub(/\/.*/,, $(i+1)); print $(i+1) } } }'` rsyncd_flags=--config=/etc/rsyncd.conf --address=$a This is far too

Re: backticks in rc.conf

2009-07-21 Thread RW
On Tue, 21 Jul 2009 14:18:37 +0300 Giorgos Keramidas keram...@ceid.upatras.gr wrote: There's a catch here that may go unnoticed for a while... rc.conf may be sourced by /etc/rc *long* before filesystems are mounted. As a result grep or awk may be not be available and stop rc.conf from

Re: backticks in rc.conf

2009-07-21 Thread Jerry McAllister
On Tue, Jul 21, 2009 at 12:24:09PM +0100, chris scott wrote: 2009/7/21 Giorgos Keramidas keram...@ceid.upatras.gr On Tue, 21 Jul 2009 11:29:20 +0200, Polytropon free...@edvax.de wrote: On Tue, 21 Jul 2009 09:46:47 +0100, chris scott kra...@googlemail.com wrote: can i use backticks in