LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need shell script for upgrading the openssl package (https://www.linuxquestions.org/questions/linux-newbie-8/need-shell-script-for-upgrading-the-openssl-package-4175511950/)

linux_student_007 07-22-2014 01:40 PM

Need shell script for upgrading the openssl package
 
Hi Team,

I have to upgrade openssl package to latest version as part of MITM(Man In The Middle vulnerability).

I am planning to write a shell script that will automate the whole upgrade process. Below are the steps I do manually.
1.I have to take backup of my present repo in the server.
2.Configure latest repo that will provide the openssl required version.
3.yum update openssl -y
4.reboot
5.once after reboot, have to replace the old repo that was taken as backup.

I am new to shell scripting. I can write small scripts by adding set of commands.

But in the above scenario is something new, can anyone please help to write the script or provide me script.


Thanks,
Linux-Student

szboardstretcher 07-22-2014 01:43 PM

No. But you can try to write one, and people here will help if you get stuck or have questions.

suicidaleggroll 07-22-2014 01:47 PM

Take it one step at a time.

How do you take a backup of your present repo in the server? How can you automate it?

Habitual 07-22-2014 03:07 PM

Why are you wanting to backup something you know is vulnerable to attacks?

szboardstretcher 07-22-2014 03:12 PM

I think he means he wants to make a backup of the current 'repo' setup, and restore it later.

In that case, you really need to look at yum usage, because there is no point in permanently disabling, or modifying the config. You can use:

Code:

yum --disablerepo=* --enablerepo=new_repo install openssl
To temporarily disable ALL repos, then immediately enable 'new_repo' and install openssl from it.

Note: When you put in your temporary repo to install the new OpenSSL, the format of the file is like this:

Code:

[new_repo]
name=Whatever
baseurl=http://whatever
enabled=0



All times are GMT -5. The time now is 08:16 PM.