From: Igor Marnat Date: Mon, 19 Mar 2007 09:24:01 +0300 Subject: [U-Boot-Users] [PATCH] README.NetConsole In-Reply-To: <20070316201329.9A296352604@atlas.denx.de> References: <20070316201329.9A296352604@atlas.denx.de> Message-ID: <744267796.20070319092401@rambler.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello guys, WD> Now if you could please submit this as a patch against WD> README.NetConsole ? Here it goes. I tried, it works. diff -urN -X dontdiff u-boot-1.1.6/doc/README.NetConsole u-boot-1.1.6-tz/doc/README.NetConsole --- u-boot-1.1.6/doc/README.NetConsole 2006-11-02 17:15:01.000000000 +0300 +++ u-boot-1.1.6-tz/doc/README.NetConsole 2007-03-19 09:20:51.000000000 +0300 @@ -34,6 +34,23 @@ stty icanon echo intr ^C +++++++++++++++++++++++++++++++++++++++++++ +Be aware that in some distributives (Fedora Core 5 at least) +usage of nc has been changed and -l and -p options are considered +as mutually exclusive. If nc complains about options provided, +you can remove the -p option from the script. For example: + ++++++++++++++++++++++++++++++++++++++++++++ +#! /bin/bash + +[ $# = 1 ] || { echo "Usage: $0 target_ip" >&2 ; exit 1 ; } +TARGET_IP=$1 + +stty -icanon -echo intr ^T +nc -u -l 6666 < /dev/null & +nc -u ${TARGET_IP} 6666 +stty icanon echo intr ^C ++++++++++++++++++++++++++++++++++++++++++++ + The script expects exactly one argument, which is interpreted as the target IP address (or host name, assuming DNS is working). The script can be interrupted by pressing ^T (CTRL-T). Best regards, Igor Marnat mailto:marny@rambler.ru