#!/bin/sh # Bring up eth0 by cheating and getting our IP from our MAC echo "Bringing up eth0" oct=`ifconfig -a eth0 | grep HWaddr | sed 's/.*:\([0-9][0-9]\)/\1/'` if ! ifconfig eth0 up 192.168.0.0x$oct; then echo "Failed to bring up eth0 to 192.168.0.0x$oct" exit 1 fi echo $oct > /etc/myoct # Mount the CD if ! mount /cdrom; then echo "Failed to mount CD" exit 1 fi # Run the user init script if [ -x /cdrom/init ]; then echo "Starting user CD init script..." /cdrom/init #halt else echo "Warning: No init script found on user CD" exit 1 fi