Skip to content
Snippets Groups Projects
kickstart24.cfg 5.75 KiB
Newer Older
# Network clean install
install
url --url="http://mirror.sucs.org/pub/linux/fedora/releases/24/Workstation/x86_64/os"
repo --name=sucsmirror --baseurl="http://mirror.sucs.org/pub/linux/fedora/releases/24/Everything/x86_64/os" --install
repo --name=fedora --cost=10

# Firewall configuration
firewall --disabled

# Root password
rootpw --iscrypted 

# System authorization information
auth  --useshadow  --enableldap --enableldapauth --ldapserver=ldaps://sucs.org --ldaploadcacert=http://sucs.org/letsencrypt-chain.pem --ldapbasedn=dc=sucs,dc=org --enableldaptls

# Use text install
text

# Run the Setup Agent on first boot
firstboot --disabled

# System keyboard
keyboard --xlayouts='gb'

# System language
lang en_GB --addsupport=cy_GB

# SELinux configuration
selinux --enforcing

# Installation logging level
logging --level=info

# X Window System configuration information
xconfig  --startxonboot

# System timezone
timezone --ntpservers=sucs.org --isUtc Europe/London

zerombr

# System bootloader configuration
bootloader --location=mbr --timeout=5

# Partition clearing information
clearpart --all 

# Disk partitioning information
part /boot --fstype="ext4" --size=500
part swap --fstype="swap" --size=4096
part / --fstype="ext4" --grow --size=1

#Enable updates repo
repo --name=updates

%packages

@gnome-desktop
@mate
@kde-desktop
@xfce
@lxde
@Administration Tools
@Design Suite
@Editors
@Educational Software
@libreoffice
@Office/Productivity
@Sound and Video
@System Tools
@Text-based Internet
@Window Managers
@Development Tools
@Books and Guides
@Engineering and Scientific
@Games and Entertainment
@Fedora Eclipse
@C Development Tools and Libraries
@base-x
@core
@dial-up
@fonts
@hardware-support
@input-methods
@multimedia
@printing
@standard
vim
cinnamon
inkscape
kile
usbutils
frozen-bubble
psi
gnucash
ncftp
bzflag
totem
armacycles-ad
subversion
bzflag
openttd
ghc
emacs
rosegarden
clusterssh
thunderbird
eclipse-subclipse
git-core
pl
meld
hugin
mapnik
ganglia-gmond
ganglia-gmond-python
terminator
gobby
pidgin
supertuxkart
tremulous
sl
freeciv
eclipse-photran
bzr
kdegraphics
ntp
dwm
texmaker
htop
openldap
openldap-clients
nss-pam-ldapd
thunderbird-lightning
clusterssh
iotop
iftop
thunderbird
terminator
switchdesk
i3
i3status
xscreensaver
xsane
icedtea-web
cowsay
libreoffice-base
wine
i3lock
nitrogen
freerdp
cmake
lockfile-progs
procmail
feh
nodejs
npm
dnf-automatic
moreutils
moreutils-parallel
llvm
clang
%end

%post --log=/root/kickstart-post.log
echo "Test, does this post script get run?"
touch /IGotRun

echo "Import keys"
rpm --import /etc/pki/rpm-gpg/*

echo "disable gpg check on sucsmirror"
echo "gpgcheck=0" >> /etc/yum.repos.d/sucsmirror.repo

echo "YOU WILL BE WORKSTATION!"
dnf groupinstall -y "Fedora Workstation"
echo "congrats it's a workstation"

echo "dnf update -y"
dnf update -y
echo "finsih dnf update"

echo "Starting rpm fusion repo install"
#Add RPM Fusion Repo
echo "install rpmfusion rpm"
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
echo "RPM Fusion added"

echo "RPMFusion doesn't seem to be keeping up with fedora releases"
#lets install unitedrpms aswell
echo "Install unitedrpms"
dnf -y install https://raw.githubusercontent.com/UnitedRPMs/unitedrpms/master/RPM/unitedrpms-24-1.noarch.rpm
echo "UnitedRPMs repo added"

#Install stuff from RPM Fusion
echo "install stuff from rpm fusion"
dnf install -y mplayer flash-plugin vlc system-switch-displaymanager
echo "finished installing stuff from rpm fusion"

echo "remove gnome crap"
dnf remove -y initial-setup gnome-initial-setup
echo "removed gnome first time use stuff"

echo "add sucs certs"
#Some more custom configuration
cd /etc/openldap/certs/
wget http://sucs.org/letsencrypt-chain.pem
echo "TLS_CACERT /etc/openldap/certs/letsencrypt-chain.pem" >> /etc/openldap/ldap.conf
echo "certs added"

echo "fiddle with some services"
chkconfig gmond on
service gmond restart
chkconfig bluetooth on
systemctl enable sshd.service
systemctl enable sssd.service
systemctl enable nslcd.service
systemctl enable nscd.service
sudo -u gdm dbus-launch gsettings set org.gnome.login-screen disable-user-list true
echo "fiddling done"

echo "lets add /home"
#Add /home to fstab and mount!
echo "137.44.10.1:/home                       /home                    nfs    vers=3.0,rw,soft,fsc,nolock    0 0" >> /etc/fstab
setsebool -P use_nfs_home_dirs on
mount -o nolock 137.44.10.1:/home /home
echo "/home should be accessable"

echo "copy some stuff of the nfs"
cp -RfL /home/install/etc/* /etc/
cp /home/install/bin/cupslogs /bin/cupslogs

# Add the scanner ~imranh
# scanner firmware
cp /home/install/scanner-firmware.bin /usr/share/sane/u176v046.bin

#add temp sensor script
cp /home/special/cacti/readtemp.sh /usr/local/bin/

echo "Import keys"
rpm --import /etc/pki/rpm-gpg/*

echo "Install stuff like steam and google chrome"
dnf install -y --nogpgcheck google-chrome-stable libtxc_dxtn gnome-tweak-tool kdenlive vlc flash-plugin
dnf install -y steam
# mp3 is not a crime
dnf install -y --nogpgcheck gstreamer-{ffmpeg,plugins-{good,ugly,bad{,-free,-nonfree}}}

echo "make gdm default"
dnf install -y system-switch-displaymanager
system-switch-displaymanager gdm

#Gnome nfs tweak
echo "Doing the gnome nfs tweak"
echo "service-db:keyfile/user" > /etc/dconf/profile/user

#add cacti to dialout so temp reading works
echo "setting up cacti user"
usermod -a -G dialout cacti

echo "install welsh language"
dnf langinstall -y cy_GB
echo "system welshed"

echo "Switch to gdm as default"
rm /etc/systemd/system/display-manager.service
systemctl enable gdm

echo "enabling auto updates"
systemctl enable dnf-automatic.timer

echo "remove a POS security hole"
dnf remove -y clipit

echo "Done!"
echo "reboot!"
reboot
%end