myDSL Extensions (deprecated) :: post install



And that also means that my whole approach to it needs to be re-thunk (as you were probably aware the whole time :D ).

The current DSL init process seems to allow custom activity only once the mydsl apps have been loaded, so it's either go with your idea of running all post-install scripts after dsl-config has run (i still need to get my head around the most efficient way to do this), or perhaps look more closely into the knoppix-autoconfig file since it runs before dsl-config.  knoppix-autoconfig checks for a boot option to load a custom knoppix.sh, but i haven't done anything with it yet.
lines 77-86, 864-927

I've done it with KNOPPIX.

Just make sure to place your knoppix.sh script inside the KNOPPIX directory instead of at the root of the CDROM.

so that would find the script automatically rather than having to specify "myconfig=/dev/something" ?  I see a number of possible ways to find it, and one seems to look in /cdrom/KNOPPIX, so I guess that would be it =).
Gonna do some more playing in a short while and hopefully have some results to post tonight.

:D :D :D

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.

To be complete you'd also need to add it to runlevel 2... incase someone is booting to console.

How is this all that different from my post_install.dsl (now .tar.gz - need to upload) that simpy extracts the proper files already in place?

The one advantage I see is that you seem to simply append to mydsl-install instead of replace it... making this aspect of your approach possibly more cross-version compatible... perhaps not... depends on how much/little DSL has changed over time...

Of course my end goal is to see this included in the distribution, so exactly how we "add" the feature now will hopefully become of 0 importance in the future. Though I suppose for legacy CDs it might still be of import.

I think having a normally packaged .dsl or .tar.gz you just drop into place is the easiest approach to this sticky problem.  If i were to adopt your "append" approach the initial post_install package would simply contain a post-install script of it's own to append the line to the right file... and that script would be run by the Sxxpost-install task in either runlevel 2 or 5... (I love how simple this stuff is when you really get into it)

Are we both really saying the same thing now, or not really?  I'm not sure, enlighten me.

Next Page...
original here.