Skip to content

Commit

Permalink
strip leading AND trailing spaces
Browse files Browse the repository at this point in the history
binhex committed Aug 25, 2017
1 parent f4b8f2a commit cc34234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run/root/start.sh
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ else
for name_server_item in "${name_server_list[@]}"; do

# strip whitespace from start and end of name_server_item
name_server_item=$(echo "${name_server_item}" | sed -e 's/^[ \t]*//')
name_server_item=$(echo "${name_server_item}" | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')

echo "[info] Adding ${name_server_item} to /etc/resolv.conf"
echo "nameserver ${name_server_item}" >> /etc/resolv.conf

0 comments on commit cc34234

Please sign in to comment.