So, post-init scripts?

Status
Not open for further replies.
Joined
Jul 13, 2013
Messages
286
I sort-of think my post-init script isn't running when the box starts. Would there normally be any log entries made indicating it ran (or how it failed), and if so what would they look like and which log would they be in? (I'm kind of expecting I'd find the script name appearing in some log file, and I don't find it in any of them.)

I can run the script manually (as root; it has things in it that require root), and the file seems to have sane protections. I browsed to the file from the dialog box for setting up the init script, so I can't really have the path wrong (and it looks right). Short of starting to add exotic "instrumentation" into my script, how do I debug this?

Also, when does "post-init" happen, and also when does pre-init happen? I'm reasonably sure this script is better run later rather than earlier, but since I'm learning this new area of FreeNAS I'd like to understand roughly when those two things happen.
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
perhaps you can add something to the end of the script that creates a file and adds some text.
then you should know if it works.
 
Joined
Jul 13, 2013
Messages
286
Yeah, that's the "instrumentation" approach I was hoping to avoid. That also requires rebooting the box; I'm hoping to find evidence of what happened *last* time I rebooted the box, if it exists, before I run around doing additional reboots (in the middle of resilver operations on a production box).
 

fta

Contributor
Joined
Apr 6, 2015
Messages
148
When mine run the output shows up on the console, which I think means you could view it with dmesg, although it might not be there anymore.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Right, if there's output, that's where it goes, but the fact that it ran doesn't seem to be logged.
 
Status
Not open for further replies.
Top