Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Installation issues on Red Hat #13

Closed
greatkemo opened this issue Jan 26, 2014 · 6 comments
Closed

Installation issues on Red Hat #13

greatkemo opened this issue Jan 26, 2014 · 6 comments

Comments

@greatkemo
Copy link

Hi Jamf,

Just running the installer script alone does not result in an installation on a basic red hat instance.. After a whole night of testing I found that the issue lays right at the beginning of the script.

Your "if and elif" statements to set ubuntuVersion based on lsb_release is faulty, as redhat also has a lsb_release (at least 6.4 and later do which I am using), therefore anything after that potentially fails as the process is assuming that I am installing on ubuntu and not red hat.

Hope this can be fixed in 3.1 and soon, as I have some new macs coming in next week with 10.9 and need a working SUS to be able to point them too.

My workaround was to rename lsb_release to lsb_release.orig then install, installation was ok, except for some reason it doesn't use https but defaults to http (not a prblem) the other issue is that the index.php and webadmin were saved under /var/www instead of /var/www/html which is the default, so i had to copy index.php and webadmin to /var/www/html.

After installation, I renamed lsb_release back and changed the line in adminHelper.sh in the if statement to look for lsb_releaseXXX just to get it to skip that part and move on to the next part which tells it this is a redhat/centos OS.

Other issues I am seeing it not adding an alias in httpd.conf for /srv/SUS is this normal? there is an alias for /srv/NETBOOT though.

Hope this helps.

Kamal

@greatkemo
Copy link
Author

Update 1:
In Netboot, when clicking the "Upload Netboot Image" nothing happens.

@greatkemo
Copy link
Author

Update 2:
In SUS, even though there are fupdates being sync'd as the main dashboard is showing me the disk usage that is slowly growing and I confirmed it from here ls -l /srv/SUS/html/content/downloads/ however they are not showing when i click on the branch I created.

@greatkemo
Copy link
Author

Update 3:
So I am guessing the trouble starts with this file "testOSRequirements.sh" as then detectedOS is parsed through the other scripts.

Maybe first step should be to detect if lsb_release exists, then search it for distro flavors, if it is not there then look for /etc/*-release

if [ -f "/usr/bin/lsb_release" ]; then

ubuntuVersion=lsb_release -s -d

case $ubuntuVersion in
Ubuntu\ 12.04)
detectedOS="Ubuntu"
export $detectedOS
;;
Ubuntu\ 10.04)
detectedOS="Ubuntu"
export $detectedOS
;;
"*")
logEvent "Error: Did not detect a valid Ubuntu OS install."
failedAnyChecks=1
;;
esac

elif [ -f "/etc/system-release" ]; then

case "$(readlink /etc/system-release)" in
"centos-release")
detectedOS="CentOS"
export $detectedOS

;;

"redhat-release")
if subscription-manager list | grep Status | grep -q 'Not Subscribed' ; then
logevent "This system is not registered to Red Hat Subscription Management."
failedAnyChecks=1
fi
detectedOS="RedHat"
export $detectedOS

;;

"*")
logEvent "Error: Did not detect a valid RedHat/Cent OS install."
failedAnyChecks=1
;;
esac

else
logEvent "Error: Did not detect a valid OS."
failedAnyChecks=1
fi

@greatkemo
Copy link
Author

Update 4:
For me this was another issue:
"redhat-release")
if subscription-manager list | grep Status | grep -q 'Not Subscribed' ; then
logevent "This system is not registered to Red Hat Subscription Management."
failedAnyChecks=1
fi
detectedOS="RedHat"
export $detectedOS

Although my server is registered, and I can install packages and updates using yum, when I run
subscription-manager list | grep Status | grep -q 'Not Subscribed' it returns nothing. and if I remove the second grep and do subscription-manager list | grep Status it returns "Status Unknown", which is strange I know, but other will probably be seeing the same, so whether it is registered or not, it should try and install packages anyway and use the yum error to determine whether it is possible or not.

@greatkemo
Copy link
Author

Update 5:

This made things work for me on red hat:
In testOSrequirements.sh and adminHelper.sh, in the snippet of code below I added a "fi" after closing the case command then I removed the el from the "elif" statement.

if [ -f "/usr/bin/lsb_release" ]; then

ubuntuVersion=lsb_release -s -d

case $ubuntuVersion in
Ubuntu\ 12.04)
detectedOS="Ubuntu"
export $detectedOS
;;
Ubuntu\ 10.04)
detectedOS="Ubuntu"
export $detectedOS
;;
"*")
logEvent "Error: Did not detect a valid Ubuntu OS install."
failedAnyChecks=1
;;
esac
fi
if [ -f "/etc/system-release" ]; then

case "$(readlink /etc/system-release)" in
"centos-release")
detectedOS="CentOS"
export $detectedOS

@jschripsema
Copy link

Commit 10eb327 closes #13

@jamf jamf closed this as completed Apr 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants