Run shell script on loading extension?Forum: myDSL Extensions (deprecated) Topic: Run shell script on loading extension? started by: friedgold Posted by friedgold on Mar. 14 2005,18:28
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. Posted by mikshaw on Mar. 14 2005,19:59
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.
Posted by cbagger01 on Mar. 14 2005,23:34
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. Posted by mikshaw on Mar. 15 2005,17:18
That isn't a post-install script....it's a boot script.
Posted by cbagger01 on Mar. 15 2005,17:58
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. Posted by mikshaw on Mar. 15 2005,18:15
That's true....i just think that if someone wants a true postinstall script, they'd need to modify mydsl-install. Your workaround works only for automatically-loaded extensions.
|