#!/bin/bash

tftpserver="$1"

[ -z ${tftpserver} ] && echo "Usage:$0 tftpserver" && exit 1

/etc/scripts/auto_privisioning.sh dhcp ${tftpserver}
retcode="$?"
if [ "foo${retcode}" != "foo0" ];then
    /etc/scripts/auto_privisioning.sh static
fi

exit 0