Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Tested script with RPM-based and Debian-based Distributions #94
Conversation
Update the error message for the case when rsyslog-gnutls package could not be downloaded automatically.
| echo "INFO: Operating system is Red Hat." | ||
| PKG_MGR="yum" |
mostlyjason
May 19, 2017
•
Contributor
I'm surprised you don't just check for the presence of the yum command, instead of trying to hardcode it based on the distribution. I was just thinking it might be more flexible to different distribution names if you checked for the executable. If this way works you can keep it though unless @mchaudhary has any comment.
I'm surprised you don't just check for the presence of the yum command, instead of trying to hardcode it based on the distribution. I was just thinking it might be more flexible to different distribution names if you checked for the executable. If this way works you can keep it though unless @mchaudhary has any comment.
Shwetajain148
May 25, 2017
Author
Contributor
@mostlyjason, Usually, yum and apt-get package managers are already present on the respective systems. For safer side, I am working on to implement conditions to check for the presence of yum and apt-get commands then I will set the PKG_MGR accordingly. If yum or apt-get would not already present in the system then I will show an error message to install yum or apt-get and then exit the script execution.
@mostlyjason, Usually, yum and apt-get package managers are already present on the respective systems. For safer side, I am working on to implement conditions to check for the presence of yum and apt-get commands then I will set the PKG_MGR accordingly. If yum or apt-get would not already present in the system then I will show an error message to install yum or apt-get and then exit the script execution.
f949480
to
734c590
I have tested the script on below environments:
-Amazon AMI
-Redhat
-CentOS
-Ubuntu
The old script had an issue with Redhat environment. The $LINUX_DIST variable gets "red" for redhat environment so old script shows a warning. So I fixed this issue as well.
Refer the change below:
https://github.com/loggly/install-script/compare/master...Shwetajain148:Modified-LinuxScript?expand=1#diff-fcb43b5e6da2f59da41dc1549eb0fdf9R223
Now the script is working fine in each environment. Please review.