PDA

View Full Version : start scripts automatically



hokiegal99
12-09-2003, 10:06 PM
I'm using knoppix 3.3 from CD as a firwall for a small network. It works great for this. I'd like to be able to automatically mount the USB flash drive (that contains the firewall script) and run the firewall script at boot w/o any user intervention. I can't figure out how to do this and as of now, I'm manually doing these two tasks. Like I said, the firewall works *great* ... I'd just like to be able to run it automatically. Any ideas? I do not want to do a hdd install.

Thanks!!! :lol:

L2Cache
12-11-2003, 01:23 AM
I auto run a setup script for my modem this way:
I put a shortcut in my autostart folder to run a script that activates my modem at startup. Then when I want to get on the internet, I click on a desktop KPPP icon that connects and launches Mozilla. Here's the script:

#!/bin/bash
# Save this file as modem.sh in /home/knoppix
# Set up a persistent home with Knoppix so files will stay put
# Make a shortcut called Modem on the desktop or in your autostart folder.
# In the shortcut under Execute put: sudo -s /modem.sh
# Check Run in terminal and it will do that as root
# Run this Modem shortcut to dial-up if your modem has not been activated.
# These lines, will be run as root, and activate the Lucent winmodem:
cd /home/knoppix/tmp
mknod /dev/ttyLT0 c 62 64
chmod a+rw /dev/ttyLT0
ln -sf /dev/ttyLT0 /dev/modem
insmod -f lt_modem.o
insmod -f lt_serial.o
# This line changes the user to knoppix, starts KPPP, and connects to MyISP.
# Uncomment the line if you want to use it:
# su knoppix -c 'kppp -c MyISP'
# --------------------------
# Make a desktop shortcut called KPPP. In the shortcut
# Under Execute put: kppp -c MyISP
# Where "MyISP" is the name of your dial-up account
# Run this KPPP shortcut to dial-up if your modem has already been activated.
# Set KPPP to redial on disconnect if pppd always dies on the first try.
# In KPPP, under your account, execute, on connect, put: mozilla
# If you want Mozilla to launch automatically on connect.


I use a custom autostart folder so that Konqueror doesn't launch every time I start Knoppix:
Right click on the desktop, click configure desktop, then paths, to make the change. I use: /home/knoppix/autostart. Then move showindex.desktop out and put the modem shortcut in.