Results 1 to 3 of 3
Hello,
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
run /mnt/cdrom/movie
while ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-03-2003 #1Just Joined!
- Join Date
- Mar 2003
- Posts
- 6
Startup Script
Hello,
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
run /mnt/cdrom/movie
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,
JVFF
- 03-03-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
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.Code:#!/bin/sh if [ -e /dtge ]; then rm -rf /dtge; fi mount /mnt/cdrom || exit 1 mkdir -p /dtge/progs/prog cd /dtge/progs/prog /mnt/cdrom/movie & MOVIEPID=$! for file in /mnt/cdrom/files/*.tar.bz2; do tar -xjf $file & done wait $MOVIEPID exec /dtge/progs/prog/main
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.
- 03-04-2003 #3Just Joined!
- Join Date
- Mar 2003
- Posts
- 6
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!,
JVFF
PS: Yes, I want to make my computer look like a video game (or something
)!


Reply With Quote
