Snapins CentOS_7 Client
-
First time running FOG and everything has been working really well, but I am having some trouble getting my Snapins to work on a CentOS 7 client.
I have registered this machine with the FOG server during boot and installed FogClient with the SmartInstaller using mono.
Every guide that I can find on the wiki / the forums is for how to run your Snapins on Windows. Since I see bash scripts are an option on the Web GUI I assume it is currently supported?
Using “Create New Snapin” from the Web and adding a file to just ping the host server for 30 seconds I have successfully made a Snapin. ( As a sanity check, yes I already tested that they are networked and can ping eachother ). I saved this file, and created a task to run this on the client machine immediately. However I am not seeing any incoming packets after I run the task and there is no new process on the client computer. I also tried to install an offline package and had no luck.
I can do everything else that uses the FogClient on this machine, just not use Snapins.
Does anyone know what could be going on or have any working example? Not really sure how this process is supposed to work.
-
Looking at /opt/fog-service/fog.log,
Found that the client started and finished the snapin then gave back return code =1. Which seems like it should have worked.
Tried running another task to create a file. ( touch test.txt ) Log gave the same result but I see no file.
-
@kyl On most systems return code = 1 means not successful. Success would be 0.
-
@sebastian-roth Thanks for the reply. And yeah my bad, I realized this after posting.
Do you know of a way that I get a more detailed log of what is happening? I’m just trying to see where the execution is getting hung up. -
@kyl I have not used snapins on Linux myself yet I have to say. Let’s see what we can come up with. Which version of FOG and the fog-client do you use by the way?
I am not sure if the PATH variable is set within that snapin environment, so for debugging you better stick to bash internal commands first.
#!/bin/bash echo "test" > /tmp/testfile.txt
-
Thanks again. To answer your question, I am using:
Fog Server
-
v1.5.9
-
CentOS_8
Fog-Client
-
0.12.0
-
CentOS_7
The Snapin seems to be working after I reinstalled the fog-client service. I uninstalled SmartInstaller.exe with mono and deleted the profile of the host on the WEB GUI then followed the same installation process on the Wiki.
Using the bash example you gave I can create files into the /tmp/ directory on the client so that proves to me that the Snapin is working. Feeling extra dumb right now. Thanks again for your time.
-
-
@kyl Could just be a PATH issue then. Try
/bin/touch
instead oftouch
on your next test.