#!/bin/bash

source /ciena/scripts/kernel_arg.sh

# -----------------------------------------------------------------------------
# main script starts here
# -----------------------------------------------------------------------------

# grab the ip parameter from the kernel command line
#
ip_parms=$(kernel_arg ip)
if [ "$?" -ne "0" ] ; then
    exit "$?"
fi

# use awk to parse out relevant parts, and put them into appropriate
# places for the le0.conf file
#
echo $ip_parms | awk -F: '{print "LE0_IP="$1;      \
                           print "LE0_MASK="$4;    \
                           print "LE0_GATEWAY="$3; \
                           print "LE0_TFTP="$2}'
