File: 50-ilo-firmware

package info (click to toggle)
python-diskimage-builder 3.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,616 kB
  • sloc: sh: 7,689; python: 3,933; makefile: 34
file content (22 lines) | stat: -rw-r--r-- 733 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if [ -d /ilo ]; then
    find /ilo -type f \( -name flash_ilo3 -o -name flash_ilo4 \) | while read FWNAME
    do
        cd "$(dirname "$FWNAME")"
        logname="$(basename "$(dirname "$FWNAME")").log"
        echo Running $FWNAME
        "$FWNAME" --silent --log "$logname"
        result=$?
        echo Finished $FWNAME with result $?
        cat "$logname"
        #avoid leaking space during large runs
        rm "$logname"
        if [ $result -eq 2 ]; then
            echo "Firmware already up to date"
        elif [ $result -eq 4 ]; then
            echo "Firmware not applicable to machine"
        elif [ $result -ne 0 ]; then
            echo "Error applying firmware"
            troubleshoot
        fi
    done
fi