diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-03 03:26:37 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-03 03:26:37 +0000 |
commit | fcd5ee36c7b5f42d557ca7b0ec8be997c0faaadb (patch) | |
tree | c8608b6f4d98caee857932190939f5e115f4adce /utils | |
parent | f98990bd9964b6bfe2fa8526f36a9b7bc2f961f7 (diff) |
Merged SL-POS.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@185 4979c152-3d1c-0410-bac9-87ea11338e46
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& |