?
Solved

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

Posted on 2014-09-30
2
Medium Priority
?
317 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 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