Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Run shell script on loading extension?< Next Oldest | Next Newest >
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: Mar. 14 2005,18:28 QUOTE

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.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 14 2005,19:59 QUOTE

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.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Mar. 14 2005,23:34 QUOTE

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.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 15 2005,17:18 QUOTE

That isn't a post-install script....it's a boot script.

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Mar. 15 2005,17:58 QUOTE

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.
Back to top
Profile PM 
5 replies since Mar. 14 2005,18:28 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Run shell script on loading extension?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code