Skip to content

Commit

Permalink
setup-dns: fix error when resolv.conf doesn't exist and no -d given
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Nov 2, 2016
1 parent 281cbbd commit 9c636b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup-dns.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ "$domain" != "" ]; then
echo "search $domain" > $conf
fi

if [ -n "$dns" ] || [ $# -gt 0 ]; then
if [ -n "$dns" ] || [ $# -gt 0 ] && [ -f "$conf" ]; then
sed -i -e '/^nameserver/d' $conf
fi
for i in $dns $@; do
Expand Down

0 comments on commit 9c636b5

Please sign in to comment.