Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: Startup Script

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Startup Script

    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,


  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Täby, Sweden
    Now this seems quite odd. Anyway it's equally easy (I'm supposing those are .tar.bz2 files in /mnt/cdrom/files, right?):
    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 &
    for file in /mnt/cdrom/files/*.tar.bz2; do
        tar -xjf $file &
    wait $MOVIEPID
    exec /dtge/progs/prog/main
    Note that this assumes that /dtge/progs/prog/main is unpacked and ready to run when /mnt/cdrom/movie exits.
    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

  3. #3
    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 )!

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts