diff --git a/cd.sh b/cd.sh index cd52fec..babce94 100644 --- a/cd.sh +++ b/cd.sh @@ -32,6 +32,16 @@ function step { fi } +function write { +local file="${1}" +local text="${2}" + if [ "${file}" ] ; then + echo -n "${text}" \ + > "${file}" \ + || exit + fi +} + step "set name servers" for server in "${CD_DNS_SERVERS[@]}" ; do echo "nameserver ${server}" \