A few changes and issue #27 fixed (external fix)
This commit is contained in:
@@ -6,7 +6,7 @@ exitOnError(){
|
|||||||
message=$2
|
message=$2
|
||||||
[ "$message" != "" ] || message="Undefined error"
|
[ "$message" != "" ] || message="Undefined error"
|
||||||
if [ $status != 0 ]; then
|
if [ $status != 0 ]; then
|
||||||
printf "[ERROR] $message, with status $status)\n"
|
printf "[ERROR] $message, with status $status\n"
|
||||||
exit $status
|
exit $status
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -184,9 +184,7 @@ if [ "$DOT" == "on" ]; then
|
|||||||
exitOnError $?
|
exitOnError $?
|
||||||
printf "DONE\n"
|
printf "DONE\n"
|
||||||
printf "[INFO] Changing DNS to localhost..."
|
printf "[INFO] Changing DNS to localhost..."
|
||||||
echo "nameserver 127.0.0.1" > /etc/resolv.conf
|
printf "`sed '/^nameserver /d' /etc/resolv.conf`\nnameserver 127.0.0.1\n" > /etc/resolv.conf
|
||||||
exitOnError $?
|
|
||||||
echo "options ndots:0" >> /etc/resolv.conf
|
|
||||||
exitOnError $?
|
exitOnError $?
|
||||||
printf "DONE\n"
|
printf "DONE\n"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user