POSTINIT Scripts Don't Seem to Work

zodiacrat

Cadet
Joined
May 29, 2021
Messages
1
I cannot seem to get POSTINIT scripts to run in TrueNAS-SCALE-21.04-ALPHA.1.

I created a simple PREINIT and POSTINIT commands to create unique files at / and only the one from the PREINIT script seems to be created on boot. Running "midclt call -job initshutdownscript.execute_init_tasks POSTINIT" does run the script and creates the file. Running "systemctl start ix-postinit" does not.

Is this just a bug or am I missing something? I didn't see anything already logged on the JIRA about it. I'm happy to log a bug if this is real.
 

thomasesrichter

Dabbler
Joined
Jan 18, 2019
Messages
15
I'm also having the same issue. Some of my Init/Shutdown Scripts are not runnnig. I have one for mounting a swap partition and other to limit Arc size. They don't seem to be running on boot.

OS Version:TrueNAS-SCALE-21.04-ALPHA.1
 
Joined
Jun 2, 2019
Messages
591
I had a similar issue on CORE until I added execute permissions (chmod a+x) to the file.
 

appliance

Explorer
Joined
Nov 6, 2019
Messages
96
my reason was the bang not precise e.g. #!bash -> #!/bin/bash
the error message (tho weird like "file not found") can be found in middlewared.log probably in all cases.
 
Top