making my-dsl executable


Forum: Other Help Topics
Topic: making my-dsl executable
started by: Patrick

Posted by Patrick on Dec. 31 2004,13:24
I there a way to (automatically execute a just installed/mydsl-loaded) application? I need to have a command-line/script? with which does 2 things: 1) execute mydsl-load "application".dsl and then 2) execute the appropiate file of the "application".

example:

1) mydsl-load openoffice.dsl
2) sudo /opt/openoffice/soffice --calc

Maybe there is a way to add lines to the DSL-file itself so that if i would type openoffice.dsl in a term it would unpack/install and execute the application automatic..??

Posted by clacker on Dec. 31 2004,13:43
Patrick, there are a lot of people better than me at bash shell scripts, but a first cut would be to put this text into a new file:
Code Sample
#!/bin/bash
mydsl-load /home/dsl/openoffice.dsl
sudo /opt/openoffice/soffice --calc

Say you called that text file ooc, you would then make that script executable by typing chmod 777 ooc so that the script would run when you type ooc into a terminal.  move it to the /usr/bin directory so that no matter where you are, the system will be able to find it.  This simple script doesn't check for an already loaded openoffice.dsl which would be a nice thing to add.  It would need to skip that first mydsl-load line if one of the openoffice files was present.

Another choice would be to put the openoffice.dsl in the root directory (/) and then it loads automatically at startup.  Then you would only need to make a command to compress your /opt/openoffice/soffice --calc line

Posted by mikshaw on Dec. 31 2004,15:15
Quote
Maybe there is a way to add lines to the DSL-file itself

Unfortunately this doesn't work.  It would be a really handy thing to be able to execute commands during mydsl installation, but at the same time it opens up a possiblity of harm to unsuspecting users.  You could do this yourself by modifying the /usr/bin/mydsl-install script....there are lots of ways to carry out an execution, so I'm not even going to begin here.

Quote
This simple script doesn't check for an already loaded openoffice.dsl which would be a nice thing to add.  It would need to skip that first mydsl-load line if one of the openoffice files was present.

[ -x /opt/openoffice/soffice ] || mydsl-load /path/to/openoffice.dsl

Posted by Patrick on Dec. 31 2004,16:32
Thnx for the input guyz..

The reason that i don't have openoffice.dsl (and some other dsl's) in the root of my bootdevice is that i already got lots of dsl's there and adding the office-dsl (and others) was too much for the memory-capacity of my pc (frugal install/ramdisk). Also: adding lots of dsl's in the root made the booting lots slower... (so i made a map called: "my-dsl" and put the bigger dsl's there so they won't installed at boottime and delay the booting)

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.