myDSL Extensions (deprecated) :: Run shell script on loading extension?
I'm new to making extension and couldn't find this info in search.
Is it possible to make an extension which runs a shell script each time its loaded (like some kind of post install script). If this isn't possible can I put it forward as an idea to the DSL developers.
The myDSL system currently isn't set up to run scripts, and i don't know if it ever will be. If you want to include this feature you will need to edit the mydsl-install script.
Yes, it is possible.
The alsadebs.dsl extension does this.
You need to add a symlink to the appropriate rc.d folder that points to your script. The standard linux boot process, ie runlevels / priorities apply.
If you want to take a peek, download the alsadebs.dsl extension to your home directory and rename it to alsadebs.tar.gz
Then untar / ungz it:
tar -zxvf alsadebs.tar.gz
and take a look at the file structure in the unarchived directory.
That isn't a post-install script....it's a boot script.
When a new extension is loaded at boot time (is placed in the root directory of the boot device),
boot script = post-install script.
Just make sure that you place your boot / post-install script at the appropriate part of the bootup process. If you place it after the mydsl-load process, then it will run after "installation", giving it the functionality of a post-install script.
You are correct in saying that mydsl-load doesn't run post-install scripts, but it is possible to accomplish the desired goal by being creative.
Next Page...
original here.