Hi,
On Wed, Jun 25, 2014 at 1:29 AM, Renich Bon Ciric
<renich(a)woralelandia.com> wrote:
My only problem is the "ssh-fix" command; since lxml caught
all the
redirections; namely "< ". It doesn't like an < with a space
next
to it.
https://github.com/renich/gce-images-fedora/blob/master/imagefactory/f20....
Just a hunch, try to put the whole block inside <command
name='ssh-fix'> between a <![CDATA[ ... ]]> block.
http://www.w3schools.com/xml/xml_cdata.asp
For the patch contents, I was wondering if "diff -u" output wouldn't
be better, unless you really intended it that way to prevent patch
failures if lines around those are added or removed.
One alternative way would be to use ex (same as vi command mode) or
sed to perform the edits:
ex -s /etc/ssh/sshd_config <<'EOF'
/^#AddressFamily/s/.*/AddressFamily inet/
/^#ListenAddress/s/^#//
/^#PermitRootLogin/s/.*/PermitRootLogin without-password/
wq
EOF
Also, probably no need to use < <( cat <<'EOF' since that's
essentially the same as a simple <<'EOF', no? I don't see how the
below would not work...
patch /etc/ssh/sshd_config <<'EOF'
...
EOF
Cheers!
Filipe