diff --git a/config b/config new file mode 100644 index 0000000..5fe8b89 --- /dev/null +++ b/config @@ -0,0 +1,6 @@ +#!/bin/bash + +# Number of clients, maximum 2 +CLIENTS=1 + +EVENT="Chaospott" diff --git a/include/nixdorf b/include/nixdorf index 4d60eae..9a5a2ef 100755 --- a/include/nixdorf +++ b/include/nixdorf @@ -1,6 +1,13 @@ #!/bin/bash -DEVICE=/dev/ttyUSB2 + function init() { + + if [ -n "$PRINTDEVICE" ]; then + export DEVICE="$PRINTDEVICE" + else + export DEVICE=/dev/ttyUSB2 + fi + stty -F $DEVICE 1:0:80000dbd:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 # \x1b\x47 - Double Strike diff --git a/start_dialog b/start_dialog index 75701f2..8001082 100755 --- a/start_dialog +++ b/start_dialog @@ -1,10 +1,13 @@ #!/bin/bash export LANG=C -export EVENT=DiVOC export TERM=vt220 export DIALOGRC=dialogrc +source ./config + +export PRINTDEVICE="/dev/ttyUSB$CLIENTS" + LOCKFILE=/tmp/c3govlock TMP=/tmp/$RANDOM BT="c3gov - v0.5" @@ -388,7 +391,7 @@ function askForFunnyUserCreds() { askPw 12 "Login" "Password:" "" password=$(cat $TMP) - if [ -f .pw/$username ]; then + if [ -f ".pw/$username" ]; then if [ "$password" != $(cat .pw/$username) ]; then clear echo "Wrong credentials."