Snapin error return 1
I have a little problem with Snapin…
It returns error 1, it seems to me that it’s a legal problem, does anyone have any idea how to provide run-time scripts?
@Warget Is this snapin issue solved?
@Warget I could be wrong, but maybe your implicit use of where the pkg file is located is causing issues?
The client, when on Linux or macOS systems, runs at the root user, where as you’re running this manually, it’s running as your logged in user.
In other words:
~/Downloads/Imprimantes.pkgwhen you manually run it is located as:
/Users/<yourloggedinusername>/Downloads/Imprimantes.pkg, but as the Client runs it is:
Mind you this would cause issues, particularly, if Imprimantes.pkg doesn’t exist on /root/Downloads/
This all said, there really isn’t any need to run the sudo portion as the FOG Client runs as the root user.
@Warget Usually real shell scripts start with a shebang (or magic line):
#!/usr/bin/env bash cd ~/Downloads echo "password" | sudo -S installer -allowUntrusted -verboseR -pkg "~/Downloads/Imprimantes.pkg" -target /
Give this a try. On the other hand it also could be a problem with the sudo command. When running this script in the terminal by hand you do this in your user context. The fog client executing this same script does it from a different context (account) which might not be allowed to run sudo.
Anyhow… Having the password in the script is definitely not a good idea. Please read about ‘sudoers’, ‘NOPASSWD’ and such things on the net. This way you should be able to make this work and still have it a little more secure than saving the password in your script file.
@Warget Nous devons encore en savoir plus sur le snapin réel que vous essayez de courir ici?
My snapin is easy it’s a shell script :
cd ~/Downloads echo "password" | sudo -S installer -allowUntrusted -verboseR -pkg "~/Downloads/Imprimantes.pkg" -target /
If I execut by terminal it’s work.
@Warget We still need to know more about the actual snapin you are trying to run here?!
Dans quel système d’exploitation tentez-vous de déployer des snapins?
Quel type de snapin
Indeed I have not been precise enough:
OS: Debian 8
OS client: Mac OS X Sierra
I think error come from right
Maybe a little bit more information?
What OS is the FOG server running?
What version of FOG?
Which OS are you trying to deploy snapins on?
What kind of snapin???