mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-22 01:10:36 +02:00
bin/fk: add option -u to force usbboot, even if SSH is/seems available
This commit is contained in:
parent
8eee093a34
commit
040911f8b9
4
bin/fk
4
bin/fk
@ -1,4 +1,7 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
if [ "$1" = -u ]; then
|
||||||
|
NN=
|
||||||
|
else
|
||||||
if [ "${1#usb}" = "$1" ]; then
|
if [ "${1#usb}" = "$1" ]; then
|
||||||
if ! ping -c 1 -w 1 "$1" >/dev/null; then
|
if ! ping -c 1 -w 1 "$1" >/dev/null; then
|
||||||
echo "no ping response from $1" 1>&2
|
echo "no ping response from $1" 1>&2
|
||||||
@ -9,6 +12,7 @@ else
|
|||||||
NN=`ifconfig ${1:-usb0} |
|
NN=`ifconfig ${1:-usb0} |
|
||||||
sed '/.*inet addr:\([^ ]*\).*/{s//\1/;s/100$/101/;s/200$/202/;p;};d'`
|
sed '/.*inet addr:\([^ ]*\).*/{s//\1/;s/100$/101/;s/200$/202/;p;};d'`
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if [ "$NN" ]; then
|
if [ "$NN" ]; then
|
||||||
echo "SCP to $NN" 1>&2
|
echo "SCP to $NN" 1>&2
|
||||||
scp uImage $NN:
|
scp uImage $NN:
|
||||||
|
Loading…
Reference in New Issue
Block a user