Last active
December 19, 2015 15:49
-
-
Save ryran/5979541 to your computer and use it in GitHub Desktop.
A lil distro-checking function for when dealing with sosreports -- mainly this is for looking for non-rhel packages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run with the first argument as the path to the root of an extracted sosreport | |
function Distro { | |
ls -l "$1"/etc/*-release; echo | |
cat "$1"/etc/redhat-release; echo | |
grep --color=no ^serverURL= "$1"/etc/sysconfig/rhn/up2date; echo | |
egrep -i 'fedora|centos|oracle|enterprise|uek|suse|nv[0-9]' "$1"/installed-rpms | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment