-
Notifications
You must be signed in to change notification settings - Fork 69
scripts/adminHelper.sh does not work on RHEL 6.5 #35
Comments
I've seen the same issue. In /var/www/html/webadmin/scripts |
Couldn't the below if statements from the adminHelper.sh be swapped around? if [ -f "/usr/bin/lsb_release" ]; then ubuntuVersion= case $ubuntuVersion in elif [ -f "/etc/system-release" ]; then case "$(readlink /etc/system-release)" in else |
Just installed 3.0.2 on RHEL 6.6 - still an issue cat /etc/redhat-release /usr/bin/lsb_release -s -d The if statement in line 5 of adminHelper.sh causes $detectedOS to be empty for my system... Josh |
You can work around this issue like so: cd /etc Then, perform the installation. When finished, restore the original config: cd /etc |
Two plus years and this is STILL an issue - I just had to manually fix adminHelper.sh again for a RHEL 6.8 server. rpm -qf /usr/bin/lsb_releaseredhat-lsb-core-4.0-7.el6.x86_64 And andy's fix above doesn't matter because the script still tests for the existence of /usr/bin/lsb_release to assume it's a Ubuntu system. I either have to manually remove redhat-lsb-core from my server (which is installed by default) or hack this adminHelper.sh to just hardcode the detectedOS... |
If I am reading this correctly, a possible solution is to take the top section of the base/testOSRequirements.sh script and copy/paste that into the existing adminHelper.sh? And, this would be the adminHelper.sh in /var/www/html/webadmin/scripts and not /var/www/html/scripts, correct? |
I'm not sure what the best solution for this is, I'm sure there's a decent way to detect between RHEL, CentOS and Ubuntu... Until there's a solution posted by JAMF I just set: detectedOS="RedHat" after all the logic on top. and have to remember to do that when I upgrade. i only have one location for adminHelper.sh on my system - it's in /var/www/html/webadmin/scripts/ |
It does not appear that setting the variable to RedHat makes any difference. The scripts are running, they just don't appear to be able to save the results. |
Line 35 - right after the "fi" and before the "case $1 in" |
You said you had selinux disabled? I'd also check /var/log/httpd/ error logs. I recall having to make a permission change as well. I think it was chown apache /var/www/appliance maybe |
I take that back. I had modified the adminHelper.sh in a different way and I guess I didn't do it right the first time. By doing the exact step above "Line 35 - right after the "fi" and before the "case $1 in" and then restarting httpd, the issue appears to be resolved. |
glad to hear it! |
One thing that still doesn't work is enabling the LDAP configuration. On the Ubuntu test appliance, it works fine but with the exact same settings on my RHEL VM, it doesn't do anything. |
Otherwise, it looks like i can save everything else which means, for us, it's 95% functional. |
As far as the LDAP proxy, I can save the settings, I just can't enable the LDAP proxy. |
Sorry can't help there, don't use it. Might want to create a new ticket or update your existing other one... |
Hi folks, The current (4.2.1) adminHelper.sh (https://github.com/jamf/NetSUS/blob/master/webadmin/var/www/webadmin/scripts/adminHelper.sh) looks quite different, so either this commit or another that was subsequent to this issue look to have fixed this. As such, I'll close this off for now. |
The OS detection for this script is flawed:
if [ -f "/usr/bin/lsb_release" ]; then
ubuntuVersion=
lsb_release -s -d
case $ubuntuVersion in
Ubuntu\ 12.04)
detectedOS="Ubuntu"
;;
Ubuntu\ 10.04)
detectedOS="Ubuntu"
;;
esac
elif [ -f "/etc/system-release" ]; then
I have a RHEL 6.5 box which also has /usr/bin/lsb_release as part of the redhat-lsb-core package, so I never get to the elif in this code block and detectedOS is left blank.
There is a fix already for this in base/testOSRequirements.sh but it hasn't been applied here. I'm not sure how people are even using NetSUS 3.0 on a RHEL box with this bug?
I worked around this by manually setting detectedOS in this adminHelper.sh but I'm wondering if there are other places where this OS detection isn't working?
Josh
The text was updated successfully, but these errors were encountered: