LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kickstart %post fails to run (https://www.linuxquestions.org/questions/linux-newbie-8/kickstart-post-fails-to-run-4175418662/)

only1rb 07-25-2012 04:42 PM

kickstart %post fails to run
 
I have a kickstart script that works just fine. We have new software that is replacing our current software. I have taken that script and in the %post section I have just changed the file name that I want to copy from nfs to new install. when I run the new kickstart it completely skips over the %post section. What causes it to skip the entire %post section? Any help would be greatly appreciated.

running Red Hat Enterprise Linux 5.1


Working %post
Code:

%post --nochroot
(
mkdir /mnt/sysimage/home/install
cp -r /mnt/source/common /mnt/sysimage/home/install/
cp -r /mnt/source/duprm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/vsftpd-2.0.5-10.el5.i386.rpm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/ncurses-devel-5.5-24.20060715.i386.rpm /mnt/sysimage/home/install/
cp /mnt/sysimage/home/install/duprm/doInstall_ts88.sh /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/duprm/install_ts88.sh
)

This is what I have changed and NOTHING ELSE!

Failing to run any of %post
Code:

%post --nochroot
(
mkdir /mnt/sysimage/home/install
cp -r /mnt/source/common /mnt/sysimage/home/install/
cp -r /mnt/source/duprm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/vsftpd-2.0.5-10.el5.i386.rpm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/ncurses-devel-5.5-24.20060715.i386.rpm /mnt/sysimage/home/install/
cp /mnt/sysimage/home/install/duprm/doInstall_1010.sh /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/duprm/install_1010.sh
)


whizzit 07-25-2012 06:16 PM

Can you add --log=/root/post.log to the %post line (?) to see if there any errors given that you can look at after the event.

When I see practically the same config where one works and the other doesn't my first suspicion is line termination. What editor was used to make changes to the file?

only1rb 07-25-2012 07:30 PM

Quote:

Originally Posted by whizzit (Post 4738009)
Can you add --log=/root/post.log to the %post line (?) to see if there any errors given that you can look at after the event.

I will try this and let you know what is in the log.


Quote:

Originally Posted by whizzit (Post 4738009)
When I see practically the same config where one works and the other doesn't my first suspicion is line termination. What editor was used to make changes to the file?

I thought the same thing. I have tried vi & wordpad.

only1rb 07-26-2012 03:46 PM

thanks wizzit! adding the log file help find the issue. I am not sure how it happened but there were extra hidden carrage returns at the end of the lines. the post.log showed the extra characters. I completely retyped (mostly cut and paste) the cfg in vi. It is now working.

whizzit 07-26-2012 03:52 PM

Excellent! :)

philip_rhoades 12-27-2012 06:45 AM

Quote:

Originally Posted by whizzit (Post 4738009)
Can you add --log=/root/post.log to the %post line (?) to see if there any errors given that you can look at after the event.

When I see practically the same config where one works and the other doesn't my first suspicion is line termination. What editor was used to make changes to the file?

I have a ks file with a lot of stuff after post and NONE of it getting done. I tried the log above and that doesn't get created either. There are only newlines (no CRs) in the file. Any other ideas?

Thanks,

Phil.

whizzit 01-07-2013 04:23 PM

Hi Phil,

This thread is solved for the OP so I guess the correct action would be to create a new thread (and reference this one if necessary) including some more information about your specific case; including details about the ks file, what system it's on etc.. Otherwise, it'll just polute this one.

If the OP is still reading - perhaps you could mark this as SOLVED ? :)

Thanks all,
Grant


All times are GMT -5. The time now is 09:33 PM.