Glorious1
Guru
- Joined
- Nov 23, 2014
- Messages
- 1,211
I have a script that controls my fans in response to drive temperature. It works fine when I execute it manually. But when I have it executed on startup, as a postinit script, it doesn't work.
"Luckily", when I restarted, FreeNAS didn't know what drive to use for booting, as it sometimes does. I had to go into the KVM/IPMI console to direct it to a boot drive. Watching that console, I saw that it tried to run the script, but many commands resulted in "Command not found".
My main question is, how can I execute the script automatically after startup, such that it can find the commands? But I'm also wondering about the console output. I couldn't find it in any log in /var/log. Does that stuff get logged? And why is this console output different from the console output that shows in the FreeNAS WebUI?
"Luckily", when I restarted, FreeNAS didn't know what drive to use for booting, as it sometimes does. I had to go into the KVM/IPMI console to direct it to a boot drive. Watching that console, I saw that it tried to run the script, but many commands resulted in "Command not found".
My main question is, how can I execute the script automatically after startup, such that it can find the commands? But I'm also wondering about the console output. I couldn't find it in any log in /var/log. Does that stuff get logged? And why is this console output different from the console output that shows in the FreeNAS WebUI?