This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #### Thank you once again Jamie Bainbridge for helping me with the script. | |
| #### Requirements: yum install -y "graphviz eog" ; copy script into file and then execute, e.g: ./scriptname.sh | |
| #### I've noticed it doesn't work too well in the new Fedora, but tested with Rhel 7 | |
| #set -x | |
| echo "" > first.dot | |
| InitPath=$(pwd) | |
| EndPath="sos_commands/networking" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # first version currently only supports 6.2.2 until i can think of a way | |
| # to only show package update from Satellite, to filter out rhel packages | |
| sequence=$(yum history list all) | |
| printf "$sequence\n" | |
| read -p "Type the ID you want to compare from: in this format: 5 26 " ids | |
| checker="https://gist.githubusercontent.com/jnikolak/7c66ce9f76fde37aa2eb51623bfd56c7/raw/6dd77476cb242dc64c1e5f6dee0d16c377246197/gistfile1.txt" | |
| pkgoutput="packages.out" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apache-commons-collections-3.2.1-22.el7_2.noarch | |
| apache-commons-daemon-1.0.13-6.el7.x86_64 | |
| apache-commons-dbcp-1.4-17.el7.noarch | |
| apache-commons-logging-1.1.2-7.el7.noarch | |
| apache-commons-pool-1.6-9.el7.noarch | |
| apr-1.4.8-3.el7.x86_64 | |
| apr-util-1.5.2-6.el7.x86_64 | |
| atk-2.14.0-1.el7.x86_64 | |
| audit-2.4.1-5.el7.x86_64 | |
| audit-libs-2.4.1-5.el7.x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This needs the package puppet which can be installed with: | |
| #Rhel 7 = rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm;yum install -y puppet | |
| #rhel 6 = requires 4 repositories | |
| #rhel-6-server-rpms -> subscription-manager repos --enable rhel-6-server-rpms | |
| #puppetlabs-products -> rpm -ivh rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm | |
| #puppetlabs-deps -> enable the repository;Change 0 to 1 | |
| #rhel-6-server-optional-rpms -> subscription-manager repos --enable rhel-6-server-optional-rpms | |
| # Once these repos are available, yum install puppet | |
| # About netperf: This script will apply recommended Tunings on Your Server. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #set -x | |
| if [ -d /etc/foreman-installer ];then | |
| password=$(grep admin_password /etc/foreman-installer/scenarios.d/satellite-answers.yaml| egrep -v pulp | awk '{print $2}') | |
| else | |
| password=$(grep admin_password /etc/katello-installer/answers.katello-installer.yaml| egrep -v pulp | awk '{print $2}') | |
| fi | |
| if [ -f ~/.hammer/cli_config.yml ];then | |
| mv ~/.hammer/cli_config.yml /tmp/cli_config.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #set -x | |
| if [ -d /etc/foreman-installer ];then | |
| password=$(grep admin_password /etc/foreman-installer/scenarios.d/satellite-answers.yaml| egrep -v pulp | awk '{print $2}') | |
| else | |
| password=$(grep admin_password /etc/katello-installer/answers.katello-installer.yaml| egrep -v pulp | awk '{print $2}') | |
| fi | |
| if [ -f ~/.hammer/cli_config.yml ];then | |
| mv ~/.hammer/cli_config.yml /tmp/cli_config.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -x | |
| ### TODO DETERMINE HOW MANY INTERFACE ACTIVE AND WHICH ONE YOU WOULD LIKE TO CONFIGURE | |
| curipaddr=$(ip link | egrep -v "lo|link" | awk -F ': ' '{print $2}') | |
| curgateway=$(ip r s table all | egrep 'default v' | awk '{print $3}') | |
| curdns=$(dig $(hostname -f) | egrep SERVER | awk -F '(' '{print $2}'| sed 's/)//') | |
| #oldName=$(grep DEVICE /etc/sysconfig/network-scripts/ifcfg-ens3 | awk -F '"' '{print $2}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -x | |
| #oldName=$(grep DEVICE /etc/sysconfig/network-scripts/ifcfg-ens3 | awk -F '"' '{print $2}') | |
| intName=$(ip link | egrep -v "lo|link" | awk -F ': ' '{print $2}') | |
| ifcfgfile="/etc/sysconfig/network-scripts/ifcfg-$intName" | |
| mv /etc/sysconfig/network-scripts/ifcfg-$intName /etc/sysconfig/network-scripts/ifcfg-$intName.bak | |
| touch $ifcfgfile | |
| for i in "DEVICE=$intName" "ONBOOT=yes" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -x | |
| mkdir -p /var/www/html/pub/sat-import/ | |
| for i in $(ls /source/sat-6-isos--rhel-7-server-x86_64*) | |
| do | |
| mkdir /mnt/iso | |
| mount -o loop $i /mnt/iso | |
| cp -ruv /mnt/iso/* /var/www/html/pub/sat-import/ | |
| sleep 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -x # Comment this out for faster implementation. | |
| #************************************************************** | |
| ## Version 0.1" | |
| ### Author: Jon Nikolakakis | |
| #### change variable $dom if you don't want the domain china.com | |
| ##### This script will install and set up your hostname, then install Satellite of your choosing. | |
| ###### The goal is to do it quickly and without much interaction. | |
| ####### The installer requires that you have downloaded the disconnected satellite iso, |