1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Should print down if the interface is empty (fixes displaying the docker IP address)

This commit is contained in:
Joe Groocock 2016-10-04 13:57:35 +01:00
parent 4a5b614cde
commit 356f6ff6b0

View File

@ -32,7 +32,7 @@ fi
#------------------------------------------------------------------------
if [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then
if [[ -z $IF ]] || [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then
echo down # full text
echo down # short text
echo \#FF0000 # color