Skip to content

Commit

Permalink
[show] Run fwutil with sudo (sonic-net#1364)
Browse files Browse the repository at this point in the history
**- What I did**
Added ability to run `show platform firmware` commands without `sudo`, as described in the [design document](https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md#platform-component-firmware-show-commands):

**- How I did it**
Made `show platform firmware` implementation run `fwutil` with `sudo` 

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
  • Loading branch information
vboykox committed Feb 1, 2021
1 parent a50b7a2 commit 28d358f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion show/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def temperature():
@click.argument('args', nargs=-1, type=click.UNPROCESSED)
def firmware(args):
"""Show firmware information"""
cmd = "fwutil show {}".format(" ".join(args))
cmd = "sudo fwutil show {}".format(" ".join(args))

try:
subprocess.check_call(cmd, shell=True)
Expand Down

0 comments on commit 28d358f

Please sign in to comment.