Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
18 changes: 18 additions & 0 deletions pkg/debug/Dockerfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM lfedge/eve-alpine:745ae9066273c73b0fd879c4ba4ff626a8392d04

ENV BUILD_PKGS="jq pciutils usbutils lsblk"

RUN eve-alpine-deploy.sh

WORKDIR /usr/bin
COPY spec.sh .

SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

RUN echo "Testing spec.sh -v..." && \
./spec.sh -v | tee /dev/stderr | jq . > /dev/null

RUN echo "Testing spec.sh..." && \
./spec.sh | tee /dev/stderr | jq . > /dev/null

CMD ["./spec.sh", "-v"]
6 changes: 5 additions & 1 deletion pkg/debug/spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ __EOT__
__EOT__
cat <<__EOT__
"usagePolicy": {}
COMMA="},"
__EOT__
COMMA="},"
fi
}

Expand Down Expand Up @@ -479,6 +479,10 @@ done

#enumerate NICs (ignoring USB devices)
for ETH in /sys/class/net/*; do
if [ ! -L "$ETH" ]; then
# skip bonding_masters file
continue
fi
LABEL=$(echo "$ETH" | sed -e 's#/sys/class/net/##' -e 's#^k##')
# Does $LABEL start with wlan or wwan? Change ztype and cost
COST=0
Expand Down
Loading