If I wanted to run a shell script that was its own file from my RHEL7 kickstart's %post
section, where would I need to put that extra file and what would be the path I would use to run it? For example, if my kickstart.cfg
file resides in my isolinux
directory, would I put the extra shell script in the isolinux file and then run it by putting ./shell-script
in my %post
section? I guess some of my confusion comes from how not understanding how the ISO unpacks everything to become the system at install time.
I want to do this for a bit more modularity in my ISO as the shell script I want to run is a few thousand lines long which I feel like would convolute the kickstart file, especially if I want to run multiple scripts after install.
For reference, here is my kickstart file:
lang en_US
keyboard us
timezone <location> --isUtc
rootpw <password> --iscrypted
#platform x86, AMD64, or Intel EM64T
reboot
text
cdrom
bootloader --location=mbr --append="rhgb quiet crashkernel=auto"
zerombr
clearpart --all --initlabel
autopart
auth --passalgo=sha512 --useshadow
selinux --enforcing
firewall --enabled --ssh
skipx
firstboot --disable
%pre
%end
%post
<RUN SHELL SCRIPT HERE>
%end
%packages
%end