Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pcie-check] Update underlying pcieutil command and add to sudoers file #6682

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions files/image_config/pcie-check/pcie-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ function debug()

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

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

Expand Down
1 change: 1 addition & 0 deletions files/image_config/sudoers/sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Cmnd_Alias READ_ONLY_CMDS = /bin/cat /var/log/syslog*, \
/usr/local/bin/decode-syseeprom, \
/usr/local/bin/generate_dump, \
/usr/local/bin/lldpshow, \
/usr/local/bin/pcieutil *, \
lguohan marked this conversation as resolved.
Show resolved Hide resolved
/usr/local/bin/psuutil *, \
/usr/local/bin/sonic-installer list, \
/usr/local/bin/sfputil show *, \
Expand Down