Michael Green wrote:
Thanks for the tips!


At some point I decided to put an infinite sleep(1) loop in the %POST
to earn some time in order to dive into the chroot environment under
Alt-F2 and experiment a bit.
No matter what I did I couldn't make the expect script to work. My
knowledge of expect is limited at best.
The original expct script was produced by autoexpect and it had this line:
spawn $env(SHELL)
which failed in chrooted env. I realized that the variable $SHELL is
empty so I replaced the line by:
spawn /bin/bash
but this didn't work either complaining that there are not enough
pseudo terminals exist.

Well, I'd think this problem solved if you ran the expect on first-boot. Can still be hands-off.




I had more success with the second approach (thanks Iain!) using
inst_sge utility. But again there were several caveats. First it took
me a considerable amount of time to realize that the $HOSTNAME in
chrooted env is not set. inst_sge wouldn't complete properly when this
var is empty. In addition kernel's kernel.hostname had to be set too
via 'sysctl -w' too.

Even though the problem is solved I'm still puzzled with how to make
expect scripts work in kickstart.

There are easier ways to clone a system, starting from using dd (maybe through a network) up to something like systemimager which I've not used, but which I hear is pretty good.


ks is easy, but probably a bootable system that restores a golden image is quicker when there's little or no difference between systems. Some differences can be handled ootb with dhcp -IP address, hostname and maybe some more.




--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to