Solved

Script to add external repository for centOS-updates, update BASH then remove the external repository?

Posted on 2014-09-30
2
313 Views
Last Modified: 2014-10-03
We have multiple servers that utilize internal REPO's that are locked. These servers range from versions centOS 5.7 to 6.5. Is there a way to write a script that can be executed that:

1. Add external repository (centOS-updates mirrors for example)
2. Update BASH to latest using YUM or rpm -Uvh
3. Remove the lines added initially for an external repository
0
Comment
Question by:meade470
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Expert Comment

by:Seth Simmons
ID: 40352778
i would make a copy of the repo file then append the file with the repo info, do yum then remove the main (modified) file and rename the original back to what it was
0
 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
ID: 40356770
I'd just copy the bash rpm file to each server and then run "yum localupdate bash.rpm" - job done
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Strings in Python are the set of characters that, once defined, cannot be changed by any other method like replace. Even if we use the replace method it still does not modify the original string that we use, but just copies the string and then modif…
Sequence is something that used to store data in it in very simple words. Let us just create a list first. To create a list first of all we need to give a name to our list which I have taken as “COURSE” followed by equals sign and finally enclosed …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question