source: lliurex-up/trunk/old/scripts/bad-dns-test @ 2636

Last change on this file since 2636 was 2636, checked in by kbut, 3 years ago

add old files

  • Property svn:executable set to *
File size: 633 bytes
Line 
1#!/bin/bash
2# Simple script to test if the old (and deprecated) DNS_EXTRA_NS
3# if it is present change to the new and better IP
4
5
6eval $(llxcfg-showvars DNS_EXTRA_NS)
7TEXTDOMAIN="lliurex-up"
8export TEXTDOMAIN
9
10INFO_MESSAGE="$(gettext "Change old DNS configuration values")"
11       
12_migrate()
13{
14        rc=0
15        echo $DNS_EXTRA_NS| grep -q '194.179.1.100\|194.179.1.101' || rc=1
16
17        if [ $rc -eq 0 ]; then
18                # The DNS is old, setting the new and improved
19                llxcfg-setvars DNS_EXTRA_NS="172.27.111.5"
20        fi
21       
22}
23
24
25_show_info()
26{
27        echo "${INFO_MESSAGE}"
28}
29
30
31
32# MAIN script
33
34case $1 in
35        migrate)
36                _migrate
37        ;;
38        info)
39                _show_info
40        ;;
41        *)
42        ;;
43esac
44
45exit 0
Note: See TracBrowser for help on using the repository browser.