On Wed, 2009-10-14 at 22:17 -0400, David Mehler wrote: > Hello, > I'm trying to do an unattended CentOS 5.3 install. For the most part > it's working. As of right now i'm statically assigning the machine an > IP which i believe will allow %post to resolve names? I also like > knowing where the box will show up. > I am however having a few issues and I'm probably thinking to > complicated on them. My first one is the fact that updates aren't > working from %post. Under the assumption name resolution is working, > see above with the static configuration, the issue is then most likely > importing of gpg keys. I've got these lines in %post: > > # GPG keys > echo "Importing GPG keys ..." > rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* > /usr/bin/yum -y update > > When they're uncommented the box hangs, i'd love to see output. ---- I would expect to see that in the error out console <Control><Alt><F4> (I think...maybe F3, or F5, I always forget). Generally, I will log everything that happens anyway so I would add to each of the 'custom lines something like '>> post-install.log 2&>1' instead ---- > My second issue is a cosmetic one. I want to set a standard prompt in > /etc/bashrc. Out of the box the bashrc PS1 lines: > > if [ "$PS1" ]; then > [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " > > I have to make changes to that second line so a sed substitution > would probably be my best bet. I'm not sure how to grab the part i > need and change it. Manually i change that line to: > > PS1='\u@\h:\w\$' ---- I find it's easier to just replace the whole file for this though you couuld use sed, I would probably just grab a copy of bashrc from an available web server and wget it it into place. ---- > I'd like to get %post to do that for me. > Next, i'd like to alter /boot/grub/grub.conf. I want to set it up for > serial terminal support, so i have to add a serial and terminal lines > at the top of the file say after any comment blocks that might or > might not be there plus add console=tty0 and/or console=ttyS0,9600n8 > to the append lines to however many kernels are there. Again, i'm > assuming sed but i'm not sure how to get the parts i need and edit. > I want to do other things, mostly with security, increasing password > complexity requirements and pam, but that should be easy once i figure > out how to alter the right sections in files. Any help appreciated. ---- sounds like you're too lazy to try sed to actually give us anything useful in terms of why it's not working. Google has millions of sed examples. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.