Solved

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

Posted on 2014-09-30
2
307 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
2 Comments
 
LVL 34

Expert Comment

by:Seth Simmons
Comment Utility
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
Comment Utility
I'd just copy the bash rpm file to each server and then run "yum localupdate bash.rpm" - job done
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Flask is a microframework for Python based on Werkzeug and Jinja 2. This requires you to have a good understanding of Python 2.7. Lets install Flask! To install Flask you can use a python repository for libraries tool called pip. Download this f…
Dictionaries contain key:value pairs. Which means a collection of tuples with an attribute name and an assigned value to it. The semicolon present in between each key and values and attribute with values are delimited with a comma.  In python we can…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now