sonic-buildimage/platform/broadcom/sonic-platform-modules-cel/haliburton/script/popmsg.sh
sandycelestica 4c8b1c4896
[udev] Add customize udev rule for console switch(for e1031) (#5571)
* Add files via upload
* Update platform-modules-haliburton.install
* Update 50-ttyUSB-C0.rules
* Update popmsg.sh
* Update udev_prefix.sh
2020-10-15 10:25:32 +08:00

15 lines
228 B
Bash

#!/bin/bash
dev="/dev/"
index=0
cnt=$(who | wc -l)
for((i=0;i<cnt;i++));
do
let "index=$i+1"
list[$i]=$(who | awk '{print $2}' | sed -n "${index}p")
list[$i]=$dev${list[$i]}
echo "port $1 disconnected" > ${list[$i]}
done