On Thu, Jan 29, 2009 at 11:44 AM, Michael DeHaan mdehaan@redhat.com wrote: ...snip...
+# Loop until the ssh rpm is installed +if [ "$keys_found" = "yes" ]; then
- while : ; do
sleep 10
if [ -d /mnt/sysimage/etc/ssh ] ; then
cp -f /tmp/ssh/ssh_host* /mnt/sysimage/etc/ssh/
logger "SSH-HOST-KEY copied to newly installed system"
break
fi
- done &
+fi +#end
Could the looping be eliminated by doing the top part in %pre and the later in %post?
ex:
%pre $SNIPPET('preserve_ssh_host_keys_pre')
%post SNIPPET('preserve_ssh_host_keys_post')
Splitting this up requires "%post nochroot" because /mnt/sysimage isn't available until after %pre. I am of the opinion "%post nochroot" is more hacky than the alternative and chose not to do it this way on purpose. What do you think is better given the options? It also seems overly complicated to require %pre and %post sections when it can all be done in %pre.
On the other hand I'm all for splitting this up if it is the difference between being included in upstream cobbler or not.
I'd also encourage everyone else who has neat kickstart tricks to contribute them. I like the idea of packaging more with Cobbler rather than just keeping them on the Wiki.
Cool, more to come as I dream up ideas that aren't company-specific.