Linux: run socat as user not as root

If sudo is used to run socat the tty cannot be opened by a regular user

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-04-07 00:08:23 -07:00
parent 440fc306a9
commit 80c5812861

View File

@@ -3,7 +3,7 @@
if [ ! -c /tmp/ttyS0 ] || [ ! -c /tmp/ttyS1 ] if [ ! -c /tmp/ttyS0 ] || [ ! -c /tmp/ttyS1 ]
then then
echo "Need to create /tmp/ttyS[01]" echo "Need to create /tmp/ttyS[01]"
echo "sudo socat PTY,link=/tmp/ttyS0 PTY,link=/tmp/ttyS1" echo "socat PTY,link=/tmp/ttyS0 PTY,link=/tmp/ttyS1"
exit 1 exit 1
fi fi