keyboard us lang en_US install #graphical text poweroff network --bootproto=dhcp --device=eth0 --onboot=on #url --url=http://scusa.lsu.edu/fedora/core/9/Fedora/i386/os url --url=http://f11.scusa.lsu.edu/core/11/Fedora/i386/os/ #url --url=http://f11.scusa.lsu.edu/core/11/Everything/i386/os/ #repo --name=SCUSA --baseurl=http://scusa.lsu.edu/rpm/ # repo --name=Everything --baseurl=http://f11.scusa.lsu.edu/core/11/Everything/i386/os/ repo --name=something --baseurl=http://f11.scusa.lsu.edu/core/11/something/ repo --name=SCUSA --baseurl=http://f11.scusa.lsu.edu/custom/ repo --name=F11Updates --baseurl=http://f11.scusa.lsu.edu/updates/11/i386/ # repo --name=F9Everything --baseurl=http://fedora.lsu.edu/core/9/Everything/i386/os/ # repo --name=F9Updates --baseurl=http://fedora.lsu.edu/core/updates/9/i386.newkey/ # repo --name=F7Updates --baseurl=http://is.cct.lsu.edu/linux/fedora/updates/7/i386/ auth --useshadow --enablemd5 firewall --disabled selinux --disabled firstboot --disable rootpw --iscrypted $1$NTDs.67V$otgd5NB..Shl0xdbTFttC1 timezone America/Chicago xconfig --defaultdesktop=KDE --depth=24 --resolution=1280x1024 --startxonboot reboot # JCK Ignore those silly USB drives, they are of no use to us ignoredisk --drives=sdb # WARNING! This will remove all other Linux partitions! clearpart --linux part / --asprimary --fstype="ext3" --size=10240 --bytes-per-inode=4096 ######bootloader --location=partition bootloader --location=mbr #Easy way to find out if your removes are in the rpm listing(typo finding) # egrep "^-" contest.ks | while read line; do line=$( echo $line | sed 's/^-//') res=$(grep -l $line /tmp/blah); echo "$line>>>$res"; done | grep -v blah %packages @editors @system-tools @legacy-fonts @text-internet @legacy-software-development #@gnome-desktop @core @base @legacy-software-support @base-x @printing @kde-desktop @development-tools @graphical-internet @sound-and-video emacs xemacs vbetool radeontool urw-fonts xorg-x11-fonts-ISO8859-1-75dpi xorg-x11-fonts-ISO8859-1-100dpi ghostscript-fonts gnome-netstatus gpgme pax gnupg2 tigervnc-server imake phpcs pylint gphpedit # Following added 200909 -evolution -evolution-perl # end of 200909 additons #Following added 2008.09.23 kdesdk kdesdk-libs kdesdk-utils perl-Compress-Raw-Zlib perl-Compress-Zlib perl-HTML-Parser perl-HTML-Tagset perl-IO-Compress-Base perl-IO-Compress-Zlib perl-XML-DOM perl-XML-Parser perl-XML-RegExp perl-libwww-perl libspectre nautilus-extensions poppler poppler-glib evince kdeutils gcalctool ruby ruby-libs gnome-terminal vim-X11 scusa-tamu mtools ############################ # change the name above to scusa-acu, scusa-ecu, scusa-baylor, scusa-lsu # as appropriate for the site ############################ #Following added in 2007 -NetworkManager-vpnc -xdelta -BackupPC -jigdo -NetworkManager-openvpn -vpnc -openldap-clients -ntfs-3g -ipsec-tools -samba-client -openvpn -zsh -bonnie++ -zisofs-tools -compat-gcc-34-g77 -tomboy -vino -zenity -xdg-user-dirs-gtk -gedit -gnome-power-manager -gnome-backgrounds -compiz-gnome -gnome-bluetooth -gok -gnome-audio -gnome-phone-manager -gnome-user-share -NetworkManager-gnome -bluez-gnome -dasher -bug-buddy -gnome-vfs2-obexftp -pulseaudio-module-x11 -pulseaudio-module-gconf -gvfs-fuse -gnome-pilot -pulseaudio-esound-compat -gnome-vfs2-smb -gdm-user-switch-applet -gthumb -nautilus-sendto -orca -nss_db -nss_ldap -stunnel -pam_pkcs11 -krb5-workstation -lftp -ntfsprogs -words -coolkey -numactl -fbset -vconfig -ftp -finger -gnupg -sendmail -rdate -device-mapper-multipath -symlinks -pcmciautils -pam_ccreds -pam_smb -ntfs-3g -dhcpv6-client -rsh -setuptool -mtr -pam_krb5 -irda-utils -pam_passwdqc -jwhois -ypbind -rdist -nc -nfs-utils -bluez-utils -logwatch -talk -xorg-x11-twm -setroubleshoot -openssh-askpass -firstboot -system-config-display -policycoreutils-gui -smolt-firstboot -krb5-auth-dialog -authconfig-gtk -system-config-services -system-config-date -system-config-firewall -system-config-printer -system-config-users -system-config-network -system-config-printer -bluez-utils-cups -samba-client -digikam -kaffeine -zenity -konversation -kdegraphics -kdemultimedia -kpowersave -NetworkManager-gnome -kdepim -kdeartwork -kipi-plugins -kdeedu -kdegames -kftpgrabber -extragear-plasma -kdenetwork -kde-settings-pulseaudio -pinentry-qt -ksshaskpass -amarok -kdeaccessibility -ktorrent -scribus -python-ldap -byacc -gcc-gfortran -rcs -systemtap -swig -doxygen -evolution -transmission -evolution-help -nspluginwrapper -evolution-webcal #Following added 2008.09.23 -a2ps -alacarte -alsa-plugins-pulseaudio -alsa-utils -authconfig -bitmap-fonts -bittorrent -bluez-utils-alsa -cadaver -ccid -cdparanoia -cdrdao -codeina -control-center -djvulibre -dvd+rw-tools -efibootmgr -eog -evince-djvu -evince-dvi -exempi -fedorainfinity-screensaver-theme -fedora-release-notes -fedora-screensaver-theme -fetchmail -file-roller -flac -genisoimage -gnome-applets -gnome-doc-utils-stylesheets -gnome-keyring-pam -gnome-media -gnome-menus -gnome-netstatus -gnome-packagekit -gnome-panel -gnome-panel-libs -gnome-python2 -gnome-python2-applet -gnome-python2-bonobo -gnome-python2-desktop -gnome-python2-extras -gnome-python2-gconf -gnome-python2-gnomevfs -gnome-python2-libegg -gnome-screensaver -gnome-session -gnome-settings-daemon -gnome-system-monitor -gnome-user-docs -gnome-utils -gsm -gstreamer-plugins-base -gstreamer-plugins-pulse -gstreamer-python -gucharmap -gvfs -icedax -iptables-ipv6 -iso-codes -libao -libbeagle -libcdio -libdv -libgail-gnome -libgpod -libgtop2 -libgweather -libmodplug -libmpcdec -libmtp -libmusicbrainz -libsamplerate -libshout -libsndfile -mutt -nas-libs -nautilus -nautilus-cd-burner -NetworkManager -NetworkManager-glib -newt-python -nss_compat_ossl -PackageKit -PackageKit-libs -pavucontrol -pcsc-lite -ppp -pulseaudio -pulseaudio-core-libs -pulseaudio-libs # next must be present for gnome-terminal to launch pulseaudio-libs-glib2 -pulseaudio-utils -rhpl -rhythmbox -sg3_utils-libs -slrn -smartmontools-config -sound-juicer -sox -speex -system-config-firewall-tui -system-config-network-tui -taglib -texinfo-tex -texlive-latex -texlive-texmf-errata-latex -texlive-texmf-fonts -texlive-texmf-latex -texlive-utils -tex-preview -totem -totem-pl-parser -totem-gstreamer -totem-mozplugin -totem-nautilus -urlview -vnc -vorbis-tools -wavpack -wireless-tools -wpa_supplicant -xine-lib -yelp -yum-packagekit # 20091008 -akonadi -brasero -brasero-libs -bluez -bluez-cups -cdrdao -dvd+rw-tools -ekiga -kdepimlibs-akonadi -kdepim-runtime-libs -kdepim-runtime -kdebluetooth -mysql -mysql-server -perl-DBD-MySQL -pulseaudio -pulseaudio-module-bluetooth -qt-mysql -xine-lib-pulseaudio #Adding to make gnome-terminal work pulseaudio-libs-glib2 %post --interpreter=/bin/bash #BASE_FILES_URL='http://scusa.lsu.edu/misc/' ###THE ENDING SLASH IS IMPORTANT BECAUSE JOSH SUCKS BASE_FILES_URL='http://f11.scusa.lsu.edu/custom/files/' ( echo "Starting Post Installation" date # step 1 - determine site, etc. interface="$(netstat -nr | grep '^0\.0\.0\.0' | head -n 1 | awk '{print $NF}')" ip="$(ifconfig "${interface}" | grep 'inet ' | cut -d':' -f2 | cut -d' ' -f1)" hostname="$(dig +short -x "${ip}" | sed -e 's/\.$//' | tr 'A-Z' 'a-z')" if [[ "${hostname:$(( ${#hostname} - 8 ))}" == ".lsu.edu" ]] then SITE="lsu" else SITE="unknown" fi if [[ ("$SITE" == "lsu") && ("${hostname:0:9}" == "acmimage.") ]] then IMAGE_TEST=1 else IMAGE_TEST=0 fi echo "--- BEGIN DEBUG ---" echo "default_interface=$interface" echo "ip=$ip" echo "hostname=$hostname" echo "SITE=$SITE" echo "IMAGE_TEST=$IMAGE_TEST" echo "--- END DEBUG ---" # import rpm signing keys rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* if (( IMAGE_TEST )) then echo "** Configuring VNC on test machine **" echo -e "f7inst\nf7inst" | vncpasswd /root/.vncpasswd >/dev/null cat >>/etc/X11/xorg.conf </etc/ssh/sshd_config echo "AllowUsers root" >> /etc/ssh/sshd_config echo "PasswordAuthentication no" >> /etc/ssh/sshd_config chmod 0600 /etc/ssh/sshd_config mkdir -p /root/.ssh chmod 0700 /root /root/.ssh wget -q "${BASE_FILES_URL}id_contest.pub" -O /root/.ssh/authorized_keys chmod 0644 /root/.ssh/authorized_keys if [[ "$SITE" == "lsu" ]] then wget -q "${BASE_FILES_URL}issue.lsu" -O /etc/issue.net echo "Banner /etc/issue.net" >> /etc/ssh/sshd_config fi # create local users and groups cd /home echo "** Creating local users and groups **" # user: team, password: team, group: teams groupadd teams useradd -c 'Team' -m -n -g teams -p '$1$NTDs.67V$otgd5NB..Shl0xdbTFttC1' team tar -zxvf /usr/local/scusa/team.tar.gz chown -R team:teams team # user: judge, password: judge, group: judges groupadd judges useradd -c 'Judge' -m -n -g judges -p '$1$NTDs.67V$otgd5NB..Shl0xdbTFttC1' judge tar -zxvf /usr/local/scusa/judge.tar.gz chown -R judge:judges judge # user: admin, password: admin, group: admins groupadd admins useradd -c 'Admin' -m -n -g admins -p '$1$NTDs.67V$otgd5NB..Shl0xdbTFttC1' admin # configure yum echo "** Configuring yum **" mkdir /etc/yum.repos.d/org for repo in $( ls -1 /etc/yum.repos.d) do mv /etc/yum.repos.d/${repo} /etc/yum.repos.d/org/${repo}.orig done for repo in fedora fedora-updates scusa do #mv /etc/yum.repos.d/${repo}.repo /etc/yum.repos.d/${repo}.repo.orig wget -q "${BASE_FILES_URL}${repo}.repo" -O /etc/yum.repos.d/${repo}.repo done # change the gdm theme (FedoraDNA or FedoraBubbles) #echo "** Configuring GDM **" #sed -e 's/\(\[greeter\]\)/\1\nGraphicalTheme=FedoraDNA/' -i /etc/gdm/custom.conf # ntp echo "** Configuring NTP **" sed -e 's/^\(server \)/#\1/' -i /etc/ntp.conf echo "server ntp1.lsu.edu" >> /etc/ntp.conf echo "server ntp2.lsu.edu" >> /etc/ntp.conf echo "server ntp3.lsu.edu" >> /etc/ntp.conf echo "server scusa0.cct.lsu.edu" >> /etc/ntp.conf echo "ntp1.lsu.edu" >/etc/ntp/step-tickers # disable access to at and cron echo "** Restricting access to cron and at **" echo 'root' >> /etc/cron.allow echo 'root' >> /etc/at.allow echo 'testing' >> /etc/billtest # setting up iptable and hosts file wget http://bilhamil.com/dump/iptables -O /etc/sysconfig/iptables ## setup contest server host echo -e '165.91.4.10\t\tpcsquared.tamu.edu contest localdoc.scusa.lsu.edu' >> /etc/hosts # use swap file instead of swap partition echo "** Configuring swap file **" dd if=/dev/zero of=/var/swapfile bs=1M count=1024 mkswap /var/swapfile echo "/var/swapfile swap swap defaults 0 0" >> /etc/fstab ## IWT 20091012 -- makes me happy +ln -s /etc/init.d /init # disable menu items echo "** Disabling extra menu items **" cd /usr/share/applications for app in \ gdmflexiserver \ gnome-gdmsetup \ kde/AdobeReader \ kde/irkick \ kde/kcmkicker \ kde/kdf \ kde/kdeprintfax \ kde/kgpg \ kde/kinfocenter \ kde/kmenuedit \ kde/knetattach \ kde/konqbrowser \ kde/konquerorsu \ kde/konsolesu \ kde/krandrtray \ kde/ksysguard \ kde/kwalletmanager \ kde/kwikdisk \ qt4-qtconfig \ do if ! grep -q '^NoDisplay=' "${app}.desktop" then echo "NoDisplay=true" >> "${app}.desktop" fi done ## IWT 20091012 # blacklist the sound driver module echo "blacklist snd_hda_intel" >> /etc/modprobe.d/blacklist.conf # enable / disable services echo "** Enabling / disabling services **" for svc in ntpd network do chkconfig --levels 345 "${svc}" on done ## for svc in autofs avahi-daemon mdmonitor nasd netfs nfslock rpcbind rpcidmapd rpcgssd yum-updatesd exim # 20090930 additions #for svc in autofs avahi-daemon mdmonitor nasd netfs nfslock rpcbind rpcidmapd rpcgssd yum-updatesd exim ip6tables portreserve auditd for svc in auditd autofs avahi-daemon exim ip6tables mdmonitor nasd netfs nfslock portreserve rpcbind rpcidmapd rpcgssd yum-updatesd do chkconfig --levels 2345 "${svc}" off done # set Linux for next boot echo "** Setting Linux for next boot **" setLinuxNextBoot ## IWT 20091012 -- set label for esthetics e2label /dev/sda2 scusa echo "** FINISHED **" # save a copy of all output for debugging ) 2>&1 | tee -a /root/post-install.log cp -f /usr/share/gdm/themes/FedoraDNA/background.jpeg /usr/share/gdm/themes/FedoraDNA/background.jpeg.orig wget -O /usr/share/gdm/themes/FedoraDNA/background.jpeg ${BASE_FILES_URL}practicebackground.jpeg cp -f /usr/share/kde-settings/kde-profile/default/share/config/kickerrc /usr/share/kde-settings/kde-profile/default/share/config/kickerrc.org wget -O /usr/share/kde-settings/kde-profile/default/share/config/kickerrc ${BASE_FILES_URL}kickerrc grep fudgeboot /proc/cmdline >/dev/null 2>/dev/null if [[ $? -eq 0 ]] then grub-install '(hd0)' fi grep cdmedia /proc/cmdline >/dev/null 2>/dev/null if [[ $? -eq 0 ]] then eject fi #chroot /mnt/sysimage #yum -y update #exit # TODO: # firewall # contest bookmarks # computer detection system (for use with nmap) # printing # scusa1 NTP server