advice on running ipmitool command every time the system boots

daf

Dabbler
Joined
Feb 27, 2017
Messages
17
Dear all I have a FreeNAS setup where by default the fans of the NAS start at full speed every time my system start (long story).
I want to run the following commands every time the system boots:
Code:
ipmitool raw 0x30 0x70 0x66 0x01 1 10
ipmitool raw 0x30 0x70 0x66 0x01 0 10


I tried putting them in the init command section of my FreeNAS
FreeNAS-11.0-U3 (c5dcf4416) setup, but they won't be running then.

Anyone some advice? And if it turns I need to write a script please some pointers?

thanks in advance!
 
Last edited by a moderator:

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Dear all I have a freenas setup where by default the fans of the NAS start at full speed everytime my system start (long story).
I want to run the following commands every time the system boots:
Code:
ipmitool raw 0x30 0x70 0x66 0x01 1 10

Code:
ipmitool raw 0x30 0x70 0x66 0x01 0 10


I tried putting them in ther init command section of my freenas
FreeNAS-11.0-U3 (c5dcf4416) setup, but they won't be running then.

Anyone some advice? And if it turns I need to write a script please some pointers?

thanks in advance!
This ought to work... How did you configure the startup task?

I would write a simple shell script and insure it works. Something like this:
Code:
#!/bin/sh
/usr/local/bin/ipmitool raw 0x30 0x70 0x66 0x01 1 10
/usr/local/bin/ipmitool raw 0x30 0x70 0x66 0x01 0 10

Then add this script as a Post Init startup task in FreeNAS. The Post Init specifier is important. See image for an example:
task-settings-init-shutdown.jpg


Good luck!
 

daf

Dabbler
Joined
Feb 27, 2017
Messages
17
This ought to work... How did you configure the startup task?

I would write a simple shell script and insure it works. Something like this:
Code:
#!/bin/sh
/usr/local/bin/ipmitool raw 0x30 0x70 0x66 0x01 1 10
/usr/local/bin/ipmitool raw 0x30 0x70 0x66 0x01 0 10

Then add this script as a Post Init startup task in FreeNAS. The Post Init specifier is important. See image for an example:
View attachment 20768

Good luck!
Sorry for the late reply, your solution worked like a charm!

Thanks a lot!
 

yourmate

Contributor
Joined
Apr 4, 2016
Messages
105
I would write a simple shell script and insure it works. Something like this:
Code:
#!/bin/sh
/usr/local/bin/ipmitool raw 0x30 0x70 0x66 0x01 1 10

Thank you!
The "/usr/local/bin/" bit did the trick ;)
 
Top