Automatic script execution on LTS client

Required:

  1. A (remastered) knoppix boot CD

  2. CDrom drive for the client

  3. http server somewhere on the local network

How to do:

#!/bin/bash

wget http://192.168.0.254/myscript.sh

echo running script ... 
sh myscript.sh

(Assumes that your server is 192.168.0.254)

Alternatively you could also use the kfp (KDE public file server utility) to avoid setting up a http server. In that case add port number 8000 (or whatever port is used for hosting myscript) after the server string. (not tested)

sample isolinux.cfg: Waits for 3 seconds and then boots with very little hardware detection.

Alternatively, there is a GUI for remastering ISO files: isomaster

Make your shell script you want to execute on the client available for http download. Script-name: myscript.sh

Now you can simply boot your client with the new Knoppix and execute whatever you place into myscript.sh

sample myscript.sh

This script does two things.

  1. It installs vmlinuz and initrd locally and creates an entry in grub menu entry to use LTSP – booted locally to save network traffic.

  2. Locks the grub menu with a password

  3. It checks mac-address, PCI bus, etc. and prompts for a comment. Comments might be serial mouse, or similar.

  4. It sends the information back to the server.