title: implement yum functions from kickstar (ks.cfg) file for rh/centos install
body: <p>I've got the following kickstart file (ks.cfg) for a raw centos installation. I'm trying to implement a "%post" process that will allow the installation to be modified, using you functions (install, groupremove, etc). The whole ks file is at the end of the issue.</p>
  
  <p>I'm not sure why, but the following kickstart is not running the yum install mysql, yum install mysql-server in the post process.</p>
  
  <p>After the install, entering "service mysql start" results in the err msg saying mysql is not found. I am, however, able to run the yum install cmds after installation, and mysql gets installed. </p>
  
  <p>I know I'm missing something subtle, but not sure what it is.</p>
  
  <hr>
  
  <pre><code>%post
  
  yum install mysql -y                    &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;NOT WORKING!!!!!
  yum install mysql-server -y              &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;NOT WORKING!!!!!
  
  %end
  </code></pre>
  
  <hr>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>ks.cfg</p>
  
  <pre><code>  [root@localhost ~]# cat /root/anaconda-ks.cfg 
  
    # Kickstart file automatically generated by anaconda.
  
    #version=DEVEL
    install
    cdrom
    lang en_US.UTF-8
    keyboard us
    network --onboot yes --device eth0 --bootproto dhcp
    rootpw  --iscrypted $1$JCZKA/by$sVSHffsPr3ZDUp6m7c5gt1
    # Reboot after installation
    reboot
    firewall --service=ssh
    authconfig --useshadow --enablemd5
    selinux --enforcing
    timezone --utc America/Los_Angeles
    bootloader --location=mbr --driveorder=sda --append=" rhgb crashkernel=auto quiet"
    # The following is the partition information you requested
    # Note that any partitions you deleted are not expressed
    # here so unless you clear all partitions first, this is
    # not guaranteed to work
    #clearpart --all --initlabel
  
    #part /boot --fstype=ext4 --size=200
    #part / --fstype=ext4 --grow --size=3000
    #part swap --grow --maxsize=4064 --size=2032
  
  
  
    repo --name="CentOS"  --baseurl=cdrom:sr1 --cost=100
  
    %packages
    @Base
    @Core
    @Desktop
    @Fonts
    @General Purpose Desktop
    @Internet Browser
    @X Window System
    binutils
    gcc
    kernel-devel
    make
    patch
    python
  
    %end
  
    %post
    cp /boot/grub/menu.lst /boot/grub/grub.conf.bak
    sed -i 's/ rhgb//' /boot/grub/grub.conf
    cp /etc/rc.d/rc.local /etc/rc.local.backup
    cat &gt;&gt;/etc/rc.d/rc.local &lt;&lt;EOF
    echo
    echo "Installing VMware Tools, please wait..."
    if [ -x /usr/sbin/getenforce ]; then oldenforce=\$(/usr/sbin/getenforce); /usr/sbin/setenforce permissive || true; fi
    mkdir -p /tmp/vmware-toolsmnt0
    for i in hda sr0 scd0; do mount -t iso9660 /dev/\$i /tmp/vmware-toolsmnt0 &amp;&amp; break; done
    cp -a /tmp/vmware-toolsmnt0 /opt/vmware-tools-installer
    chmod 755 /opt/vmware-tools-installer
    cd /opt/vmware-tools-installer
    mv upgra32 vmware-tools-upgrader-32
    mv upgra64 vmware-tools-upgrader-64
    mv upgrade.sh run_upgrader.sh
    chmod +x /opt/vmware-tools-installer/*upgr*
    umount /tmp/vmware-toolsmnt0
    rmdir /tmp/vmware-toolsmnt0
    if [ -x /usr/bin/rhgb-client ]; then /usr/bin/rhgb-client --quit; fi
    cd /opt/vmware-tools-installer
    ./run_upgrader.sh
    mv /etc/rc.local.backup /etc/rc.d/rc.local
    rm -rf /opt/vmware-tools-installer
    sed -i 's/3:initdefault/5:initdefault/' /etc/inittab
    mv /boot/grub/grub.conf.bak /boot/grub/grub.conf
    if [ -x /usr/sbin/getenforce ]; then /usr/sbin/setenforce \$oldenforce || true; fi
    if [ -x /bin/systemd ]; then systemctl restart prefdm.service; else telinit 5; fi
    EOF
    /usr/sbin/adduser test
    /usr/sbin/usermod -p '$1$QcRcMih7$VG3upQam.lF4BFzVtaYU5.' test
    /usr/sbin/adduser test1
    /usr/sbin/usermod -p '$1$LMyHixbC$4.aATdKUb2eH8cCXtgFNM0' test1
    /usr/bin/chfn -f 'ruser' root 
  
  
  
  
    %end
  
    %post
  
    yum install mysql -y                    &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;NOT WORKING!!!!!
    yum install mysql-server -y              &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;NOT WORKING!!!!!
  
    %end
  </code></pre>