mtik_initrd_hacks/ftp_upload.sh
Sergey Sergeev 1f9564198c Finally, support for 7.0b1 has been added.
Everything works ... tested on RB3011.
For the rest of the boards, maybe need to slightly correct the path to the /pub directory.
2019-09-12 00:55:18 +03:00

22 lines
351 B
Bash
Executable file

#!/bin/sh
HOST="172.20.1.1"
USER="admin"
PASS=${FTP_UPLOAD_PASS}
[ -z ${PASS} ] && {
echo "just do# export FTP_UPLOAD_PASS=xYz"
exit 1
}
FILE=./bins/kernel-new.elf
FAKEFNAME="linux_t1.bin"
[ "$HOST" = "127.0.0.1" ] && {
cat $FILE > /var/lib/tftpboot/$FAKEFNAME
exit 0
}
ftp -inv $HOST << EOF
user $USER $PASS
put $FILE $FAKEFNAME
bye
EOF
exit 0