Lines Matching +full:non +full:- +full:gracefully
3 set -e
4 set -u
5 set -o pipefail
8 echo -e "\nCaught EXIT signal. Terminating background processes."
9 jobs -p | xargs -r kill 2>/dev/null
15 MODBUS_SERVER="/usr/libexec/phosphor-modbus/mock-modbus-server"
17 if [ "$#" -eq 0 ]; then
20 elif [ "$#" -eq 1 ]; then
22 if ! [[ "$SERVER_COUNT" =~ ^[0-9]+$ ]]; then
23 echo "Error: Count must be a non-negative integer." >&2
34 echo "Creating directory /dev/serial/by-path"
35 mkdir -p /dev/serial/by-path
38 echo "Removing old symlinks from /dev/serial/by-path/..."
39 rm -f /dev/serial/by-path/platform-1e6a1000.usb-usb-0:1:1.*-port0
48 echo " - Starting socat for $TTY_USB and $TTY_V."
49 …socat -v -x -d -d pty,link="$TTY_USB",rawer,echo=0,b115200 pty,rawer,echo=0,link="$TTY_V",b115200 &
54 echo " - Creating symlink for $TTY_USB..."
55 ln -sf $TTY_USB "/dev/serial/by-path/platform-1e6a1000.usb-usb-0:1:1.$i-port0"
58 echo " - Starting $MODBUS_SERVER instance $i."
63 echo "Press Ctrl+C to terminate all processes gracefully."