Skip to content

Commit 820d350

Browse files
authored
[pcie-check] Update underlying pcieutil command and add to sudoers file (#6682)
- Why I did it As of sonic-net/sonic-utilities#1297, subcommands of pcieutil have changed to remove the redundant pcie- prefix. This PR adapts calling applications (pcie-check) to the new syntax. Resolves #6676 - How I did it Remove pcie- prefix from pcieutil subcommands in calling applications Also add pcieutil * to sudoers file, as pcieutil requires elevated permissions
1 parent ca35503 commit 820d350

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

files/image_config/pcie-check/pcie-check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ function debug()
1616

1717
function check_and_rescan_pcie_devices()
1818
{
19-
PCIE_CHK_CMD='sudo pcieutil pcie-check |grep "$RESULTS"'
19+
PCIE_CHK_CMD='sudo pcieutil check | grep "$RESULTS"'
2020
PLATFORM=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
2121

2222
if [ ! -f /usr/share/sonic/device/$PLATFORM/plugins/pcie.yaml ]; then
23-
debug "pcie.yaml does not exist! can't check pcie status!"
23+
debug "pcie.yaml does not exist! Can't check PCIe status!"
2424
exit
2525
fi
2626

files/image_config/sudoers/sudoers

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Cmnd_Alias READ_ONLY_CMDS = /bin/cat /var/log/syslog*, \
3434
/usr/local/bin/decode-syseeprom, \
3535
/usr/local/bin/generate_dump, \
3636
/usr/local/bin/lldpshow, \
37+
/usr/local/bin/pcieutil *, \
3738
/usr/local/bin/psuutil *, \
3839
/usr/local/bin/sonic-installer list, \
3940
/usr/local/bin/sfputil show *, \

0 commit comments

Comments
 (0)