Fix static ip route
when using a static ip should set default gateway also noticed an echo line not going to the $LOG Closes: #133 [via git-merge-pr]
This commit is contained in:
parent
0dae4a3158
commit
284be34a1f
@ -918,13 +918,13 @@ configure_net_static() {
|
||||
DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} Failed to bring $dev interface." ${MSGBOXSIZE}
|
||||
return 1
|
||||
fi
|
||||
echo "running: ip addr add $ip dev $dev"
|
||||
echo "running: ip addr add $ip dev $dev" >$LOG
|
||||
ip addr add $ip dev $dev >$LOG 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} Failed to set ip to the $dev interface." ${MSGBOXSIZE}
|
||||
return 1
|
||||
fi
|
||||
ip route add $gw dev $dev >$LOG 2>&1
|
||||
ip route add default via $gw >$LOG 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} failed to setup your gateway." ${MSGBOXSIZE}
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user