-
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.
DellEMC: S6100, Z9332f - Include ONIE version in 'show platform firmw…
…are status' (#10493) Why I did it To include ONIE version in show platform firmware status command output in DellEMC S6100 and Z9332f platforms. How I did it Include ‘ONIE’ in the list of components provided by platform APIs in DellEMC S6100 and Z9332f. Unmount ONIE-BOOT if mounted using fast/soft/warm-reboot plugins in DellEMC S6100.
- Loading branch information
1 parent
f4b22f6
commit 942bef4
Showing
10 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -18,6 +18,9 @@ | |
}, | ||
{ | ||
"name": "SSD" | ||
}, | ||
{ | ||
"name": "ONIE" | ||
} | ||
], | ||
"fans": [ | ||
|
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 |
---|---|---|
|
@@ -30,6 +30,9 @@ | |
}, | ||
{ | ||
"name": "PCIe" | ||
}, | ||
{ | ||
"name": "ONIE" | ||
} | ||
], | ||
"fans": [ | ||
|
28 changes: 28 additions & 0 deletions
28
platform/broadcom/sonic-platform-modules-dell/common/onie_version
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,28 @@ | ||
#!/bin/bash | ||
# script to get the ONIE version from NOS | ||
|
||
ONIEPATH="/mnt/onie-boot" | ||
|
||
# Exit if not superuser | ||
if [[ "$EUID" -ne 0 ]]; then | ||
echo "This command must be run as root" >&2 | ||
exit 1 | ||
fi | ||
|
||
# Mount ONIE partition if not already mounted | ||
if ! grep -qs ${ONIEPATH} /proc/mounts; then | ||
mkdir -p ${ONIEPATH} | ||
mount LABEL=ONIE-BOOT ${ONIEPATH} || ERR=$? | ||
if [[ ${ERR} -ne 0 ]]; then | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# Get ONIE version | ||
onie_version=$(${ONIEPATH}/onie/tools/bin/onie-version | grep "ONIE version") || ERR=$? | ||
if [[ ${ERR} -ne 0 ]]; then | ||
exit 1 | ||
fi | ||
|
||
onie_version=$(echo ${onie_version} | awk '{print $NF}') | ||
echo ${onie_version} |
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
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
7 changes: 7 additions & 0 deletions
7
platform/broadcom/sonic-platform-modules-dell/s6100/scripts/fast-reboot_plugin
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
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
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
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
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