config is in ez-ipupdate 3.0.11b8-13.4ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | #!/bin/sh
set -e
# Source debconf library
. /usr/share/debconf/confmodule
service_supports_wildcards()
{
service=$1
ret=1
case "$service" in
ez-ip|dhs|dyndns|dyndns-static|easydns|easydns-partner)
ret=0
;;
esac
return $ret
}
service_supports_mx()
{
service=$1
ret=1
case "$service" in
ez-ip|dhs|dyndns|dyndns-static|easydns|zoneedit)
ret=0
;;
esac
return $ret
}
service_needs_server()
{
service=$1
ret=1
case "$service" in
gnudip)
ret=0
;;
esac
return $ret
}
# I no longer claim this question, migrate it.
if db_get ez-ipupdate/daemon; then
case "$RET" in
true) db_set ez-ipupdate/ppp "false" ;;
false) db_set ez-ipupdate/ppp "true" ;;
esac
db_unregister ez-ipupdate/daemon
fi
# I no longer claim this question either.
if db_get ez-ipupdate/manage_default_config_automatically; then
case "$RET" in
false) db_set ez-ipupdate/service_type "configure manually" ;;
esac
db_unregister ez-ipupdate/manage_default_config_automatically
fi
# Name the configuration file
conf=/etc/ez-ipupdate/default.conf
# Do you want debconf to manage the default configuration?
if [ -f "$conf" ]; then
service="`sed -ne 's/^service-type *= *//p' < $conf`"
fi
if [ -n "$service" ]; then
db_set ez-ipupdate/service_type "$service"
fi
db_input high ez-ipupdate/service_type || true
db_go
db_get ez-ipupdate/service_type
if [ "$RET" != "configure manually" ]; then
if [ -f "$conf" ]; then
# Grab existing values from config file
if grep "^daemon" $conf > /dev/null 2>&1; then
ppp="false"
fi
service="`sed -ne 's/^service-type *= *//p' < $conf`"
server="`sed -ne 's/^server *= *//p' < $conf`"
username="`sed -ne 's/^user *= *\([^:]*\):.*/\1/p' < $conf`"
password="`sed -ne 's/^user *= *[^:]*://p' < $conf`"
hostname="`sed -ne 's/^host *= *//p' < $conf`"
interface="`sed -ne 's/^interface *= *//p' < $conf`"
if grep "^wildcard" $conf > /dev/null 2>&1; then
wildcard="true"
fi
dns_mx="`sed -ne 's/^mx *= *//p' < $conf`"
# Poke the values into debconf
if [ -n "$ppp" ]; then
db_set ez-ipupdate/ppp "$ppp"
fi
if [ -n "$service" ]; then
db_set ez-ipupdate/service_type "$service"
fi
if [ -n "$server" ]; then
db_set ez-ipupdate/server "$server"
fi
if [ -n "$username" ]; then
db_set ez-ipupdate/username "$username"
fi
if [ -n "$password" ]; then
db_set ez-ipupdate/password "$password"
fi
if [ -n "$hostname" ]; then
db_set ez-ipupdate/hostname "$hostname"
fi
if [ -n "$interface" ]; then
db_set ez-ipupdate/interface "$interface"
fi
if [ "$wildcard" = true ]; then
db_set ez-ipupdate/dns_wildcard true
fi
if [ -n "$dns_mx" ]; then
db_set ez-ipupdate/dns_mx "$dns_mx"
fi
fi
# Ask for new answers
db_beginblock
db_input high ez-ipupdate/ppp || true
db_input high ez-ipupdate/username || true
db_input high ez-ipupdate/password || true
db_input high ez-ipupdate/hostname || true
db_endblock
db_go
# Need to determine whether wildcards and MX records are supported
# by the chosen service
db_beginblock
db_get ez-ipupdate/service_type
service_type="$RET"
if service_needs_server "$service_type"; then
db_input high ez-ipupdate/server || true
else
db_set ez-ipupdate/server ""
fi
if service_supports_wildcards "$service_type"; then
db_input medium ez-ipupdate/dns_wildcard || true
else
db_set ez-ipupdate/dns_wildcard false
fi
if service_supports_mx "$service_type"; then
db_input medium ez-ipupdate/dns_mx || true
else
db_set ez-ipupdate/dns_mx ""
fi
db_endblock
db_go
# Check whether we really need to know the listening interface
db_beginblock
db_get ez-ipupdate/ppp
ppp="$RET"
if [ "$ppp" = "false" ]; then
db_input high ez-ipupdate/interface || true
fi
db_endblock
db_go
fi
|