I want to make a startup script that executes itself after all others. This is what it does:
mount the cdrom
create a dir called /dtge/progs/prog
while it is running it creates a thread for each file on /mnt/cdrom/files/ and copy and (bz2) extract each file into dir /dtge/progs/prog
after movie has finished it runs /dtge/progs/prog/main
Also, is there a way to skip the text login screen and automatically login as root? And is there a way to delete /dtge/progs on shutdown or reboot? ThanX in advance,
Now this seems quite odd. Anyway it's equally easy (I'm supposing those are .tar.bz2 files in /mnt/cdrom/files, right?):
Note that this assumes that /dtge/progs/prog/main is unpacked and ready to run when /mnt/cdrom/movie exits.
if [ -e /dtge ]; then rm -rf /dtge; fi
mount /mnt/cdrom || exit 1
mkdir -p /dtge/progs/prog
for file in /mnt/cdrom/files/*.tar.bz2; do
tar -xjf $file &
To delete /dtge on shutdown, just make the shutdown scripts run "rm -rf /dtge".
To skip login, edit /etc/inittab.
I'm guessing that you're making some kind of "autorunner" on CD that displays a nice intro movie when booted, right? In that case, you might also want to check out LPP to make it look even nicer. See http://lpp.linuxfreak.nl/About.phtml.
ThanX! Thatīs exactly what I was looking for. Can I execute another program if it doesnīt mount? Like an error program or "put a CD on the drive and click OK" or "Whatīs your cdrom drive" etc. ThanX again!,
PS: Yes, I want to make my computer look like a video game (or something :D )!