#!/bin/bash # Copy various other scripts/installers to the computer mkdir /tmp/scripts/ ; cd /tmp/scripts wget http://kickstart.example.net/kickstart/common/sethostname wget http://kickstart.example.net/kickstart/common/NVIDIA-Linux-x86-1.0-7676-pkg1.run wget http://kickstart.example.net/kickstart/common/installer chmod -R 755 /tmp/scripts # Users/privileges useradd dummy -c "Dummy user" -p dORiJ/EKpZ1XQ -s /bin/bash echo "%group ALL=(ALL) ALL" >> /etc/sudoers # Network configuration echo "DHCP_HOSTNAME=\$HOSTNAME.example.net" >> /etc/sysconfig/network echo "PEERDNS=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0 echo "PEERNTPD=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0 wget -O /etc/auto.master http://kickstart.example.net/kickstart/common/auto.master wget -O /etc/ntp.conf http://kickstart.example.net/kickstart/common/ntp.conf wget -O /etc/resolv.conf.tmp http://kickstart.example.net/kickstart/common/resolv.conf cp --reply=yes /etc/resolv.conf.tmp /etc/resolv.conf # Preferences wget -O /usr/share/backgrounds/images/default.png http://kickstart.example.net/kickstart/common/default.png # Turn services on/off for service in "cups" "hpoj" "iptables" "ip6tables" ; do chkconfig $service off ; done for service in "ypbind" "autofs" "ntpd" "yum" ; do chkconfig $service on ; done # Notify user when kickstart has finished address=`ifconfig eth0 | grep 'inet addr'| awk '{print $2}'|sed -e "s/addr\://"` mail -s "Kickstart complete for $address at $HOSTNAME" user@example.com < /etc/redhat-release # Fedora specific options if [ ! `grep -c Fedora /etc/redhat-release` = 0 ] then fcrel=`grep release "/etc/redhat-release" | awk '{print $4}'` rpm --import /usr/share/doc/fedora-release-$fcrel/RPM-GPG-KEY* wget -O /etc/yum.repos.d/fedora-updates.repo http://kickstart.example.net/kickstart/common/fedora-updates.repo fi # Redhat specific options if [ ! `grep -c "Red Hat" /etc/redhat-release` = 0 ] then fi