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
Pages: (5) </ 1 2 3 [4] 5 >/

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

reply to topic new topic new poll
Topic: post install, script in progress< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 05 2005,20:04 QUOTE

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


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





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Sep. 05 2005,20:08 QUOTE

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.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 05 2005,20:27 QUOTE

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.


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





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 05 2005,23:41 QUOTE

: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.


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





Group: Members
Posts: 41
Joined: Aug. 2005
Posted: Sep. 06 2005,00:20 QUOTE

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.
Back to top
Profile PM 
22 replies since Sep. 04 2005,14:33 < Next Oldest | Next Newest >

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

Pages: (5) </ 1 2 3 [4] 5 >/
reply to topic new topic new poll
Quick Reply: post install

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