nALFS Syntax Query

John Lane lfs at jelweb.com
Tue Oct 25 14:06:23 PDT 2005


Good evening. I received no replies to my question last night, so I have
worked around the problem. I don't think this is particularly elegant but it
gets the job done. If there is a nice way to do this then I'd be interested
in pointers. If there isn't then could a solution be considered for a future
nALFS version?

What I wanted to do:
     <search_replace base="/etc/openldap">
        <file>slapd.conf</file>
        <find>[SLAP_PASSWD]</find>
        <replace>
        <execute command='/usr/sbin/slappasswd -h {SSHA} -s &root-passwd;'
/>
        </replace>
      </search_replace>

What I had to do:
      <execute command="/bin/sed">
         <param>-i</param>
         <param>-e "s%\[SLAP_PASSWD\]%`/usr/sbin/slappasswd -h {SSHA} -s
&root-passwd;`%"</param>
         <param>/etc/openldap/slapd.conf</param>
      </execute>

Regards,
John




More information about the alfs-discuss mailing list