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:
parent
4a5b614cde
commit
356f6ff6b0
@ -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 # full text
|
||||||
echo down # short text
|
echo down # short text
|
||||||
echo \#FF0000 # color
|
echo \#FF0000 # color
|
||||||
|
Loading…
Reference in New Issue
Block a user