Invoke hostinfo.php from powershell
-
Looked it over, and that seems correct.
-
Hi,
yes it works,
but not all fields ar filled with values:
[[ -z $primaryuser ]] && export primaryuser=‘’
[[ -z $othertag ]] && export othertag=‘’
[[ -z $othertag1 ]] && export othertag1=‘’I have set a primaryuser but it is not shown.
By the way,
Do you plan to create a REST api ore something else?R,
Andreas
-
@andreas.paul I can say for fog 1.x.x there are no plans for an REST api. With FOG 2.x (still a while off) there will be a lot more options since its reported that FOG 2.x may be using node.js for ist structure.
The intent of the hostinfo.php is to build a bash script that can be executed on the target computer for scripting, and not really how you are intending to use it. I’m not saying that you can’t work with it. You will just need to discard everything to the left of the space after the export tag.
-
@andreas.paul Confirmed that primary user is not passed to hostinfo.php
[[ -z $imagepath ]] && export imagepath='WIN10_ENT_X64' [[ -z $primaryuser ]] && export primaryuser='' [[ -z $othertag ]] && export othertag='tag1' [[ -z $othertag1 ]] && export othertag1='tag2' [[ -z $sysman ]] && export sysman='VMware, Inc.'
Primary user should list “JimBob” and not blank.
FOG version used 1.3.4 -
Fixed for 1.3.5 working branch.
I’m working on issues with logical/extended partitions right now.
I can tell you all, I hate partitioning scheme maths.
-
@Tom-Elliott said in Invoke hostinfo.php from powershell:
Fixed for 1.3.5 working branch.
I can tell you all, I hate partitioning scheme maths.Simple
p1 + p2 = (square root of infinity). That way it always fits.
-
Hi,
thanks for fixing.
if i do a git pull witch version i will have, current is: “1.3.5-RC-10” is this the working branch?
Because if it is it will not work :-(.
And good look with your math study I think i know what you try to to its the same shit as you try to mount the 5 extended partition in a dd file via loop, it’s crap.
R,
Andreas
-
@andreas.paul There is a development branch (i.e. pre RC11) where the fix lives. Let me check to see if the fix can be back ported to RC10.
-
@andreas.paul I sent you a DM (little talk bubble on the fog tool bar).
-
@andreas.paul said in Invoke hostinfo.php from powershell:
Im intrested in the option to query the database direct, do you have any snipped for this?
I’ve only done it with BASH, it’s easy in bash. Here’s an article about doing it in powershell. All I did was google-search “powershell query mysql” and there’s tons of results.
http://www.thomasmaurer.ch/2011/04/powershell-run-mysql-querys-with-powershell/