[ previous ] [ next ] [ threads ]
 From:  "John Voigt" <megeek at jvoigt dot com>
 Cc:  <m0n0wall at lists dot m0n0 dot ch>
 Subject:  config.xml magic
 Date:  Thu, 24 Jun 2004 02:27:23 -0400
Hi there:

I'm trying to add a small php script using echo commands inside the shellcmd
area of the config.xml file.  Like:

<shellcmd>mkdir /usr/local/www/xyzzy</shellcmd>
<shellcmd>echo "#!/usr/local/bin/php" >
<shellcmd>echo "<?php echo \"Hello, world\"; ?>" >>
<shellcmd>chmod 755 /usr/local/www/xyzzy/xxx.php</shellcmd>

I can't figure out how to echo a "<" though as it keeps getting interpreted
byt the XML parser.  Anyone know a way to make it pass as a literal?  (The
above example should end up with the following)

<?php echo "Hello, world"; ?>"

Maybe this just isn't possible or maybe I just need the right escape
character.  \074 (the octal code for <) doesn't seem to work.  I can make
this work entering it via exec.php but I can't seem to figure out how to
stick it into the xml.

John Voigt, President

Reston Wireless, LLC
High speed internet service
no smoke, no mirrors, no wires (tm)