mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Sep. 05 2005,23:41 |
|
Found something that works for init and after login. I swear you never stop learning new things when you use Linux =o) I spent at least an hour tweaking knoppix.sh, rebooting, retweaking, rerebooting...just couldn't get it to work during init. It seems that adding things to rcS.d does nothing. Maybe these files are loaded into ram together, before they run? Anyway, by adding to rc5.d instead, it works =o) This is knoppix.sh:
Code Sample | PISCRIPT=/etc/init.d/mydsl-postinstall rm -f /etc/init.d/mydsl-install cp /KNOPPIX/etc/init.d/mydsl-install /etc/init.d/ echo "$PISCRIPT" >> /etc/init.d/mydsl-install cat << EOF > $PISCRIPT #!/bin/sh for PIscript in /tmp/mydsl.postinstall/*; do [ -x "\$PIscript" ] && \$PIscript && chmod -x \$PIscript done EOF chmod +x $PISCRIPT ln -s $PISCRIPT /etc/rc5.d/S00mydsl-postinstall |
To use this feature, the post-install script for your myDSL package would need to be a uniquely named executable file placed in /tmp/mydsl.postinstall/ Keep in mind that since the script is run by root, any new files created by the script in /home/dsl will need to be chowned.
btw, this one should also work for uci extensions although i haven't tested it.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|