X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fnetconsole;h=c8109bb09569ab770aa26be63fad94433b97fc09;hb=7aabd2b12c5108276eb1fc7789b8955f3258db98;hp=6ef2723f5848a0b7f973067271d9c5bf1150a18a;hpb=770931805d292908a57a3d2c5f9a4fcde888b5a2;p=u-boot diff --git a/tools/netconsole b/tools/netconsole index 6ef2723f58..c8109bb095 100755 --- a/tools/netconsole +++ b/tools/netconsole @@ -39,9 +39,20 @@ echo "NOTE: the interrupt signal (normally ^C) has been remapped to ^T" stty -icanon -echo intr ^T ( -while ${nc} -u -l -p ${port} < /dev/null ; do - : -done +if type ncb 2>/dev/null ; then + # see if ncb is in $PATH + exec ncb ${port} + +elif [ -x ${0%/*}/ncb ] ; then + # maybe it's in the same dir as the netconsole script + exec ${0%/*}/ncb ${port} + +else + # blah, just use regular netcat + while ${nc} -u -l -p ${port} < /dev/null ; do + : + done +fi ) & pid=$! ${nc} -u ${ip} ${port}