# Add site_admin account
chroot ${vdir} /usr/sbin/useradd -p "" -u 502 -m site_admin
+
+# Remove 32bit packages from 64bit system
+# use rpm instead of yum as /proc is not mounted at that poing
+if echo ${vdir} | grep -q x86_64 ; then
+ chroot ${vdir} rpm -qa --qf '%{name}.%{arch}\n' | grep 'i[36]86$' | xargs chroot ${vdir} rpm -e
+fi