1 install 2 KVM_TEST_MEDIUM 3 text 4 reboot 5 lang en_US 6 keyboard us 7 network --bootproto dhcp 8 rootpw 123456 9 firewall --enabled --ssh 10 selinux --enforcing 11 timezone --utc America/New_York 12 firstboot --disable 13 bootloader --location=mbr --append="console=tty0 console=ttyS0,115200" 14 zerombr 15 poweroff 16 17 clearpart --all --initlabel 18 autopart 19 20 %packages 21 @base 22 @development-libs 23 @development-tools 24 ntpdate 25 %end 26 27 %post --interpreter /usr/bin/python 28 import socket, os 29 os.system('dhclient') 30 os.system('chkconfig sshd on') 31 os.system('iptables -F') 32 os.system('echo 0 > /selinux/enforce') 33 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 34 server.bind(('', 12323)) 35 server.listen(1) 36 (client, addr) = server.accept() 37 client.send("done") 38 client.close() 39 %end 40