including shell scripts in .dsl


Forum: myDSL Extensions (deprecated)
Topic: including shell scripts in .dsl
started by: ghost

Posted by ghost on June 07 2005,09:40
(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!

Posted by mikshaw on June 07 2005,14:00
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.
Posted by friedgold on June 07 2005,14:00
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.

Posted by ghost on June 09 2005,19:53
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??

Posted by friedgold on June 09 2005,22:01
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.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.