Change Full Host Registration / QuickImage
-
Works great man thanks
-
Cool. Blackout integrated this into the codebase moving forward. I have always thoroughly enjoyed the guessing game and lookup when a host exists but I don’t know which one it is. /sarcasm off
-
Yep, love it. Shared with the rest of the FOG evangelists I know.
-
is there anyway to add a similar idea to the ‘Quick Host Reg and inventory’ for when the machine is already registered to show what machine it is? at the moment it just shows host exists
-
yes quite easy actually, without looking at the code, you should be able to use the same principle above but for auto.register.php
-
thanks will take a look when back at work
-
Lee (or anyone) are you able to help, I cant seem to find where to edit this?
-
change auto.register.php line 77 (dependant on version you’ve got but it’s around there)
from:
[B]$sql = “select count() as cnt from hosts where hostMAC = ‘" . $mac . "’";[/B]
to:
[B]$sql = "select hostName, count() as cnt from hosts where hostMAC = '” . $mac . “'”;[/B]
and then change output on line 264 (again might be diff line - version)
from:
[B]echo (“Exists”);[/B]
to:
[B]echo “”.(“This Machine is already registed as”).": " . $ar[“hostName”] . “”;[/B]i haven’t tested this but can’t see why it wouldn’t work
-
Thank you!! This works perfectly using FOG 0.32. This is so handy.
I would love to see this put into 0.33 code, I know the above patch has been (not sure if this part has).
Thanks again to everyone in thread
[quote=“Lee Rowlett, post: 9534, member: 28”]change auto.register.php line 77 (dependant on version you’ve got but it’s around there)
from:
[B]$sql = “select count() as cnt from hosts where hostMAC = ‘" . $mac . "’";[/B]
to:
[B]$sql = "select hostName, count() as cnt from hosts where hostMAC = '” . $mac . “'”;[/B]
and then change output on line 264 (again might be diff line - version)
from:
[B]echo (“Exists”);[/B]
to:
[B]echo “”.(“This Machine is already registed as”).": " . $ar[“hostName”] . “”;[/B]i haven’t tested this but can’t see why it wouldn’t work :)[/quote]
-
Added this to quick inventory screen as it was very simple. Thanks Lee!