Есть скрипт:
TFTP="xxx.xxx.xxx.xxx"
MAC=$(busybox ifconfig eth0 | busybox grep HWaddr | busybox awk '{print $5}')
echo "Getting settings from your tftp: $TFTP"
busybox tftp -r "pxe\\tiny.cfg\\settings.cfg" -l "./settings.cfg" -g "$TFTP"
if [ -a settings.cfg ]; then
echo "Parsing settings file"
PROF=$(grep -i $MAC settings.cfg | awk '{print $2}')
echo "Found profile: $PROF"
FILE=${PROF}".tar"
echo $FILE
if [ -n "$PROF" ]; then
busybox tftp -r "pxe\\tiny.cfg\\settings\\$FILE" -l "./$FILE" -g $TFTP
else
echo "Your profile have not been found"
fi
else
echo "Error retrieving file"
fi
Getting settings from your tftp: xxx.xxx.xxx.xxx
Parsing settings file
Found profile: pfiles
.tares
tftp: server error: (1) File not found