#!/bin/sh
PWD=`pwd`
DATE=`date +%Y%m%d`
ARCH=`uname -p`
RELEASE=`cat /etc/redhat-release | awk '{ print $3 }'`
# ******************************
# Add the admin Group and local Users - if not already there.
# Set passwd to "Passw0rd" with a Zero
# ******************************
if [ -d /home/jradtke ]
then
echo "mv /home/jradtke /home/jradtke.${DATE} "
mv /home/jradtke /home/jradtke.${DATE}
fi
getent group admin >/dev/null || groupadd -g 6969 admin
getent group jradtke >/dev/null || groupadd -g 2025 jradtke
getent passwd jradtke >/dev/null || useradd -g 2025 -u 2025 -G admin -s /bin/bash -c "James Radtke" -d /home/jradtke -p '<encr passwd here>' jradtke
# UPDATE THE SUDOERS FILE
cat << EOF >> /etc/sudoers
## ALIASES
Host_Alias CRASHHOSTS = neo,neo.matrix.private,cypher
User_Alias CRASHUSERS = jradtke
Cmnd_Alias CRASHCMNDS = /usr/bin/systemctl restart ntpd.service, /bin/cat /etc/shadow
Cmnd_Alias CRASHDOALL = ALL
## SUDO COMMANDS
CRASHUSERS ALL = NOPASSWD: /bin/su -
CRASHUSERS CRASHHOSTS = NOPASSWD: CRASHCMNDS, CRASHDOALL
# Added for local admins
%admin ALL=(ALL) NOPASSWD: ALL
EOF
# ******************************
# Update REPOs
# ******************************
yum -y install yum-plugin-fastestmirror
# INSTALL ALL THE GOOD STUFF (RPMFUSION)
# http://rpmfusion.org/Configuration/
# First, install the basic repo's
yum -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
# Second, install the release-specific repo's
yum -y localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${RELEASE}.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${RELEASE}.noarch.rpm
# Add Google stuff
wget https://dl-ssl.google.com/linux/linux_signing_key.pub
rpm --import linux_signing_key.pub
case $ARCH in
i386)
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
# Google - i386
cat << EOF >> /etc/yum.repos.d/google-i386.repo
[google]
name=Google - i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
EOF
;;
x86_64)
yum -y install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
# Google - x86_64
cat << EOF > /etc/yum.repos.d/google-x86_64.repo
[google64]
name=Google - x86_64
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
EOF
;;
*)
echo "ERROR: Unsupported Architecture: $ARCH"
;;
esac
# ******************************
# Install Packages
# ******************************
# Install "system-esque" type stuff
yum -y install sysfsutils iotop sysstat git intltool nmap autofs policycoreutils-gui gnome-rdp rdesktop tomboy openssh-askpass ntpd spice-gtk-python eclipse eclipse-pydev python-lxml spice-client spice-xpi wireshark wireshark-gnome
#yum -y install virt-viewer virt-manager
yum -y install gcc kernel-headers kernel-devel
yum -y install google-chrome-stable
yum -y install flash-plugin
# Enable non-encrypted DVD
yum -y install libdvdread libdvdnav gstreamer-plugins-ugly gstreamer-plugins-bad lsdvd gstreamer-ffmpeg
#libdvdcss
# Audio Packages (Amarok rocks... Banshee is better)
#yum -y install banshee banshee-community-extensions banshee-devel
#yum -y install amarok
#yum -y install rhythmbox
yum -y install gnome-do-plugins-rhythmbox pidgin-rhythmbox rhythmbox-equalizer gstreamer gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly phonon-backend-gstreamer gstreamer1-libav gstreamer1-plugins-ugly gstreamer1-plugins-bad-freeworld
#yum -y install audacious audacious-plugins lame twolame libvorbis-devel
#yum -y install gpodder
# Video Players
yum -y install xine-lib xine-lib-extras-freeworld
yum -y install mplayer smplayer
# Video CODECS
yum -y install vlc
# Install Java
yum -y install java-*-openjdk icedtea-web libreoffice
# ******************************
# Update GRUB - This image should work for everyone.
# I have a boot splash that I like to use
# ******************************
cp /etc/default/grub /etc/default/grub.orig
find /home/ -name splash-tree.tga -exec cp {} /boot/grub \;
case $RELEASE in
18|19)
echo "Fedora 18|19 grub updates go here mang..."
echo "Update /boot/grub2/themes/system/theme.txt"
echo "Run this: grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg"
yum -y install grub2-starfield-theme-2.00-22.fc19.x86_64
cat << EOF >> /etc/default/grub
GRUB_GFXMODE=1600x900x16
GRUB_THEME="/boot/grub2/themes/system/theme.txt"
EOF
sed -i -e '1i#grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg' /etc/default/grub
;;
17)
cat << EOF >> /etc/default/grub
# Custom stuff
GRUB_DISABLE_RECOVERY="true"
GRUB_SAVEDEFAULT="true"
GRUB_GFXMODE=1600x900x16
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_BACKGROUND=/boot/grub2/Fedora_DJ.jpg
EOF
# Insert comments into the grub file so that I can remember how to create an updated GRUB
sed -i -e '1i# grub2-mkconfig -o /boot/grub2/grub.cfg' /etc/default/grub
sed -i -e '2i# grub2-mkfont --output=/boot/grub2/unicode.pf2 /usr/share/fonts/dejavu/DejaVuSansMono.ttf' /etc/default/grub
# create a new GRUB
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkfont --output=/boot/grub2/unicode.pf2 /usr/share/fonts/dejavu/DejaVuSansMono.ttf
;;
*)
echo "No grub update going to happen today"
;;
esac
mkdir -p /home/shared/Pictures/Wallpapers /home/shared/Pictures/Icons
chown -R jradtke:users /home/shared
yum -y install pidgin docky expect
# Install Packages for Conky (and conky-manager) and nixnote
yum -y install conky hddtemp lm_sensors p7zip p7zip-plugins openssl-static
# ******************************
# UPDATE THE ENTIRE MACHINE
# ******************************
yum clean all
yum -y update
# Jazz up Gnome 3 shell
yum -y update glibc audit
yum -y install gnome-shell-extension*
yum -y install ccsm gnome-tweak-tool gnome-common gnome-theme-curvylooks gnome-themes-legacy gnome-shell-theme-atolm gnome-shell-theme-elementary gnome-shell-theme-gaia gnome-shell-theme-orta gnome-shell-theme-smooth-inset gnome-shell-extension-alternative-status-menu.noarch gnome-shell-extension-systemMonitor.noarch gnome-shell-extension-user-theme verne-backgrounds-gnome gnome-shell-extension-weather gnome-shell-extension-calc gnome-shell-extension-auto-move-windows gnome-shell-extension-apps-menu verne-backgrounds-extras-gnome verne-backgrounds-gnome system-switch-displaymanager-gnome gnome-video-arcade gnome-shell-theme-* gnome-applet-sensors gnome-applets
yum -y install xscreensaver xscreensaver-extras-gss xscreensaver-gl-* gnome-screensaver
yum -y install plymouth-*
plymouth-set-default-theme spinfinity
# App for managing shortcuts
yum -y install alacarte
echo "run /usr/bin/gsettings set org.gnome.shell.clock show-date true"
echo "run /usr/bin/gsettings set org.gnome.shell.calendar show-weekdate true"
exit 0
Comments
Post a Comment