diff --git a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.postinst b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.postinst index 74a4a4b17928..1ebafb7fdabb 100644 --- a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.postinst +++ b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.postinst @@ -1,4 +1,7 @@ depmod -a +sudo chmod +x /usr/local/bin/udev_prefix.sh +sudo chmod +x /usr/local/bin/popmsg.sh +sudo chmod +x /usr/local/bin/reload_udev.sh systemctl enable platform-modules-haliburton.service systemctl enable fancontrol.service @@ -6,5 +9,4 @@ systemctl start platform-modules-haliburton.service systemctl start fancontrol.service /usr/local/bin/platform_api_mgnt.sh install -sudo chmod +x /usr/local/bin/udev_prefix.sh -sudo chmod +x /usr/local/bin/popmsg.sh +/usr/local/bin/reload_udev.sh diff --git a/platform/broadcom/sonic-platform-modules-cel/haliburton/script/reload_udev.sh b/platform/broadcom/sonic-platform-modules-cel/haliburton/script/reload_udev.sh new file mode 100644 index 000000000000..aa4e2c67cd4d --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-cel/haliburton/script/reload_udev.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +UDEV_DIR=/etc/udev/rules.d/50-ttyUSB-C0.rules +TTYUSB_DIR=/dev/ttyUSB + +if [ -f "$UDEV_DIR" ]; then + for i in {0..95} + do + ttydev=$TTYUSB_DIR$i + if [ -c "$ttydev" ]; then + udevadm trigger -c add $ttydev + fi + done +fi