diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2006-10-14 09:31:03 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2006-10-14 09:31:03 +0000 |
commit | ccaf94592342255f3f0692c242196fb157a48137 (patch) | |
tree | ead59f55d6eedb39843ff755962e03a25e3f78c6 /setup-dns | |
download | alpine-conf-ccaf94592342255f3f0692c242196fb157a48137.tar.bz2 alpine-conf-ccaf94592342255f3f0692c242196fb157a48137.tar.xz |
intial import - version 0.6.0
Diffstat (limited to 'setup-dns')
-rwxr-xr-x | setup-dns | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/setup-dns b/setup-dns new file mode 100755 index 0000000..fd6b04e --- /dev/null +++ b/setup-dns @@ -0,0 +1,25 @@ +#!/bin/sh + +PREFIX= +. "$PREFIX/lib/libalpine.sh" + +conf="$ROOT/etc/resolv.conf" +if [ -f "$conf" ] ; then + domain=`awk '/^domain/ {print $2}' $conf` + dns=`awk '/^nameserver/ {print $2}' $conf` +fi + +echon "DNS domain name? (e.g 'bar.com') [$domain] " +default_read domain $domain +echon "DNS nameserver(s)? [" +for i in $dns ; do + echon "$i " +done +echon "] " +default_read dns "$dns" + +echo "search $domain" > $conf +for i in $dns ; do + echo "nameserver $i" >> $conf +done + |