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
 

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

reply to topic new topic new poll
Topic: including shell scripts in .dsl< Next Oldest | Next Newest >
ghost Offline





Group: Members
Posts: 7
Joined: May 2005
Posted: June 07 2005,09:40 QUOTE

(I tried hard to find this in the docu and this forum, really!!!!)

How can I include shell scripts in .dsl-files? So far I have been tar-ing and zipping my files and renamed the .tar.gz to .dsl.

But now I need to execute a few lines of bash-script. Where can I put the script so that mydsl-load executes it after unpacking the tarball?

PLEASE don't say it's in the documentation!!!!!!!!!

Thanks!
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: June 07 2005,14:00 QUOTE

you can't do that.  The install script merely extracts the archive into the filesystem.  Any running of scripts will need to be done manually.  One thing that could be done if you need to set some things up before running a program is create a wrapper that is launched instead of the application itself.  The script would set up your environment, do whatever else is necessary, and then run the program.

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





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: June 07 2005,14:00 QUOTE

I asked this question a while ago (here)

Although there is no support for post-install scripts with DSL extensions there are a couple of creative ways around this.

One way suggested by cbagger (see here) is including init scripts in the .dsl extension. An example of this is the alsadebs.dsl. Also you can create a wrapper for your application in order to setup the variables it needs before it's run (e.g. see here.

What goal are you wanting to achieve with your shell script? There might be some way of achieving it with one of the above methods.
Back to top
Profile PM 
ghost Offline





Group: Members
Posts: 7
Joined: May 2005
Posted: June 09 2005,19:53 QUOTE

Thanks for your help!
All I need to do is run a depmod -a and a modprobe command after extracting my archive.

My current workaround is planting my .dsl in root and modifying the bootlocal-script (which is stored in the backup.tar.gz).
That's not really great but it works as long as you know what you are doing.

Linking a script to the rc.d-folder seem to be a lot better. Which rc.d -dir is executed after dsl-extraction? I suppose it's /etc/rc.d/rc3.d??
Back to top
Profile PM 
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: June 09 2005,22:01 QUOTE

DSL extensions are loaded by the /etc/rcS.d/S01dsl-config so your init script would need to go somewhere after that. If you create a symlink from /etc/rcS.d/S99name_here to a script containing all the commands you want run I believe that will work.
Back to top
Profile PM 
3 replies since June 07 2005,09:40 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: including shell scripts in .dsl

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