Together with runasap="1" params (not available in jconstruct-tui because the jconstruct-tui for manual creation) this can be used to automatically run something in a jail when creating a container in an automated manner and performing individual actions
You can see config for jcreate (and runasap= params) by pressing 'no' for 'Do you want to create jail immediately?' question
add create.d/master_create.d directories in system skel
external_exec_script: added a tag for jail autorun ( -a options ) as
trigger to run the container to run cusom scripts.
remove dup code ( external_exec_master_script/external_exec_script func )
I was asking about the possibility of executing code on first jail start to further customize the jail when static configuration files in the skeleton are not enough.
(because changing the shell by forcing a password file is a bit "rude" ;) or when I want to configure the jail with utf-8, I need to execute cap_mkdb /etc/login.conf)
What I was asking already exist in the form of /etc/rc.cbsdjail_first_boot and this script will be executed and then deleted (whether it was successfully executed or not if I read the code well)
You are now adding a create.d directory to extend this capability ?
How will it work ? If it exists, all scripts in it will be executed in order and the directory will be deleted ?
I think it is a great idea that allow modularity.
Yes you are right, /etc/rc.cbsdjail_first_boot will be deleted regardless of the errcode (hmm, process errcode and do not delete script if $? != 0 - this is probably the right way).
Concerning to new 'create.d' directory and 'master_create.d' - when this directories in 'skel' dir exist and have any files, they are executed). After executing directory and/or script not deleted (nevertheless, they will never work for this environment in next time, since they are run from the jcreate script which will never be performed for an already existing environment).