Skip to main content

finish script fedora 19


#!/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

Popular posts from this blog

P2V using dd for KVM-QEMU guest

Preface: I have certainly not exhaustively tested this process.  I had a specific need and found a specific solution that worked. Situation:  I was issued a shiny new laptop running Red Hat Enterprise Linux 7 (with Corp VPN, certs, Authentication configuration, etc...)  The image was great, but I needed more flexibility on my bare metal.  So, my goal was to P2V the corporate image so I could just run it as a VM. * Remove corporate drive and install new SSD * install corp drive in external USB-3 case * Install RHEL 7 on new SSD * dd old drive to a disk-image file in a temp location which will be an image which is the same size as your actual drive (unless you have enough space in your destination to contain a temp and converted image) * convert the raw disk-image to a qcow file while pushing it to the final location - this step should reduce the disk size - however, I believe it will only reduce/collapse zero-byte blocks (not just free space - i.e. if you de...

Sun USS 7100 foo

TIP: put ALL of your LUNs into a designated TARGET and INITIATOR group when you create them.  If you leave them in the "default" group, then everything that does an discovery against the array will find them :-( I'm struggling to recognize a reason that a default should even be present on the array. Also - who, exactly, is Sun trying to kid.  The USS is simply a box.. running Solaris .. with IPMP and ZFS.  Great.  If you have ever attempted to "break-in" or "p0wn" your IBM HMC, you know that there are people out there that can harden a box - then.. there's Sun.  After a recent meltdown at the office I had to get quite intimate with my USS 7110 and learned quite a bit.  Namely: there's a shell ;-) My current irritation is how they attempt to "warn you" away from using the shell (my coverage expired a long time ago to worry about that) and then how they try to hide things, poorly. I was curious as to what version of SunOS it ...

"Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)"

"Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)" One issue that may cause this to arise is if you managed to break your /etc/fstab We had an engineer add a line with the intended options of "nfsvers=3" but instead added "-onfsvers=3" and it broke the system fairly catastrophically.