Fixed path issue for trap.functions
This commit is contained in:
parent
698f8fd539
commit
a36cca5fc6
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ trim() {
|
||||||
}
|
}
|
||||||
|
|
||||||
getDefaultIP() {
|
getDefaultIP() {
|
||||||
local routedev=$(ip -o -4 route show default)
|
local routedev=$(/sbin/ip -o -4 route show default)
|
||||||
routedev=${routedev##* dev }
|
routedev=${routedev##* dev }
|
||||||
routedev=${routedev%% *}
|
routedev=${routedev%% *}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ getDefaultIP() {
|
||||||
echo "127.0.0.1"
|
echo "127.0.0.1"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
local defipaddr=$(ip -o -4 addr show "${routedev}")
|
local defipaddr=$(/sbin/ip -o -4 addr show "${routedev}")
|
||||||
defipaddr=${defipaddr##* inet }
|
defipaddr=${defipaddr##* inet }
|
||||||
defipaddr=${defipaddr%% *}
|
defipaddr=${defipaddr%% *}
|
||||||
local mask=${defipaddr#*/}
|
local mask=${defipaddr#*/}
|
||||||
|
|
Loading…
Reference in a new issue