-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[celestica]: Fix E1031 udev rules not work for sonic os first boot af…
…ter be installed (#7043) Use udevadm to trigger the udev rules on the first boot How to verify: - Connect C0 with E1031; - Install or upgrade the sonic os to 202012 branch; - When access to sonic check if /dev/C0-1 to /dev/C0-48 are existed.
- Loading branch information
1 parent
da7f596
commit 169af8d
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.postinst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
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 | ||
|
||
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 |
14 changes: 14 additions & 0 deletions
14
platform/broadcom/sonic-platform-modules-cel/haliburton/script/reload_udev.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |