#!/bin/sh
# 
if [ "$1" = "prereqs" ]; then
  exit 0
fi

quiet=n

. /scripts/functions
# if break=download_settings STOP here
maybe_break download_settings

. /conf/tcos.conf
. /conf/tcos-run-functions

MYIP=$(grep 'fixed-address' /var/lib/dhcp/dhclient.leases | head -1| awk '{print $2}' | sed s/";"//g)

download_file /tcos/conf/${MYIP}.conf /conf/mysettings.conf 
if [ $? -eq 0 ]; then 
  log_begin_msg "Download personalized settings ${MYIP}.conf" 
  log_end_msg 0 
else 
  log_begin_msg "No personalized settings to download" 
  log_end_msg 0 
fi 
echo 56 > /tmp/progress
update_progress


exit 0
