#!/bin/bash # Copyright (C) Eric Shubert # # script to do initial bootstrap processing (disable selinux, update everything) ###################################################################### # Change Log # 12/26/13 written by Eric 'shubes' ###################################################################### ###################################################################### # disable SELINUX # a2_disable_selinux(){ selinux_config=/etc/selinux/config if [ ! -f "$selinux_config" ]; then echo "$me - $seclinux_config not found" exit 1 fi echo "$me - disabling SELINUX ..." sed -i$(date +%Y%m%d) -e "s|^SELINUX=.*$|SELINUX=disabled|" $selinux_config } ###################################################################### # main routine begins here # me=${0##*/} myver=v1.0 echo "$me - $myversion" a2_disable_selinux echo "$me - updating all packages (yum update) ..." yum clean all yum -y update echo "$me - rebooting now..." shutdown -r now echo "$me - completed" exit 0