diff options
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/pos/directnet.pl | 20 | ||||
-rwxr-xr-x | utils/pos/pos-hardware-client-startup-script | 11 |
2 files changed, 31 insertions, 0 deletions
diff --git a/utils/pos/directnet.pl b/utils/pos/directnet.pl new file mode 100755 index 00000000..3bdd2e51 --- /dev/null +++ b/utils/pos/directnet.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl + +($host, $proto, $port) = @ARGV; + +socket(SOCK, 2, 1, getprotobynumber($proto)); + +$dest=pack( + 's n a4 x8', 2, $port, + pack('CCCC', split(/\./, $host)) +); + +connect (SOCK, $dest); + +open ('STD', '-'); +while ($line = <STD>){ + print SOCK $line; +} +close STD; +close SOCK; + diff --git a/utils/pos/pos-hardware-client-startup-script b/utils/pos/pos-hardware-client-startup-script new file mode 100755 index 00000000..bcb3240a --- /dev/null +++ b/utils/pos/pos-hardware-client-startup-script @@ -0,0 +1,11 @@ +#!/bin/bash +netcat=/usr/local/bin/netcat +while((1)) +do + $netcat -lp6601 > /dev/ttyS0 +done& + +while((1)) +do + $netcat -lp6602 > /dev/lp0 +done& |