config is in gforge-mta-exim4 5.1.1-2.
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 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | #!/bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
#- beginning of included section from handle-mainconffile.config
###
# Functions to handle the main FusionForge configuration file
###
mainconfdir=/etc/fusionforge
mainconffile=$mainconfdir/fusionforge.conf
create_mainconffile () {
if [ ! -e $mainconfdir ] ; then
mkdir -p $mainconfdir
fi
if [ ! -e $mainconffile ] ; then
if [ -e /etc/gforge/gforge.conf ] ; then
cp -a /etc/gforge/gforge.conf $mainconffile
else
touch $mainconffile
fi
chmod 600 $mainconffile
fi
}
init_debconf_from_mainconffile () {
for i in $(grep -v "^ *#" $mainconffile | sort -u | cut -d= -f1) ; do
update_onevar_from_mainconfile $i
done
}
update_onevar_from_mainconfile () {
key=$1
update_onevar_from_mainconfile__retcode=0
value=$(grep ^$key= $mainconffile | tail -1 | cut -d= -f2-)
if [ ! -z "$value" ] ; then
db_set fusionforge/shared/$key $value || update_onevar_from_mainconfile__retcode=$? || true
# case $update_onevar_from_mainconfile__retcode in
# 0)
# echo "$key = $value injected into Debconf OK"
# db_fset fusionforge/shared/$key seen true || true
# ;;
# 10)
# echo "$key = $value not injected into Debconf (non-existing question maybe?)"
# ;;
# *)
# echo "Something wicked happened"
# exit 1
# ;;
# esac
fi
}
update_mainconffile () {
for key in $@ ; do
db_get fusionforge/shared/$key
val=$RET
update_onevar_mainconffile $key $val
done
}
update_onevar_mainconffile () {
key=$1
val=$2
if grep -q "^$key=" $mainconffile ; then
newval=$(echo $val | sed -e 's/@/\\@/g' -e 's/\$/\\$/g' -e 's/\//\\\//g')
perl -pi -e "s/^$key=.*/$key=$newval/" $mainconffile
else
echo "$key=$val" >> $mainconffile
fi
}
#- end of included section from handle-mainconffile.config
create_mainconffile
init_debconf_from_mainconffile
#- beginning of included section from common-variables.config
db_get fusionforge/shared/domain_name || true
if [ -z "$RET" ] ; then
hostname=$(hostname -f 2>/dev/null) || hostname=localhost
db_set fusionforge/shared/domain_name $hostname
fi
db_input medium fusionforge/shared/domain_name || true
db_go || true
db_get fusionforge/shared/server_admin || true
if [ -z "$RET" ] ; then
db_get fusionforge/shared/domain_name || true
db_set fusionforge/shared/server_admin "webmaster@$RET"
fi
db_input medium fusionforge/shared/server_admin || true
db_input low fusionforge/shared/system_name || true
db_go || true
vars="system_name domain_name server_admin"
update_mainconffile $vars
#- end of included section from common-variables.config
#- beginning of included section from get-pw-from-debconf.config
get_pw () { # Use Debconf to get a password
get_pw__pwname=$1
get_pw__priority=$2
get_pw__ok=''
while [ -z "$get_pw__ok" ] ; do
db_input ${get_pw__priority} ${get_pw__pwname} || get_pw__retcode=$? || true
db_input ${get_pw__priority} ${get_pw__pwname}_confirm || true
db_go
if [ "$get_pw__retcode" = 30 ] ; then
get_pw__ok="not-asked"
else
db_get ${get_pw__pwname} || true
get_pw__PW1=$RET
db_get ${get_pw__pwname}_confirm || true
get_pw__PW2=$RET
if [ "$get_pw__PW1" = "$get_pw__PW2" ] ; then
get_pw__ok="confirmed"
else
get_pw__ok="mismatch"
db_fset ${get_pw__pwname} seen false
db_fset ${get_pw__pwname}_confirm seen false
fi
fi
done
case $get_pw__ok in
not-asked)
echo "not-asked"
;;
confirmed)
echo "confirmed"
;;
*)
echo "SHOULDN'T HAVE HAPPENED"
exit 1
;;
esac
}
#- end of included section from get-pw-from-debconf.config
#- beginning of included section from users-variables.config
db_fget fusionforge/shared/users_host seen || true
if [ "$RET" = "false" ] ; then
db_get fusionforge/shared/domain_name
db_set fusionforge/shared/users_host users.$RET
fi
db_input medium fusionforge/shared/users_host || true
db_go || true
vars="users_host"
update_mainconffile $vars
#- end of included section from users-variables.config
#- beginning of included section from lists-variables.config
db_fget fusionforge/shared/lists_host seen || true
if [ "$RET" = "false" ] ; then
db_get fusionforge/shared/domain_name
db_set fusionforge/shared/lists_host lists.$RET
fi
db_input medium fusionforge/shared/lists_host || true
db_go || true
vars="lists_host"
update_mainconffile $vars
#- end of included section from lists-variables.config
if [ -f /etc/aliases.gforge-new ]
then
ucf --debconf-ok /etc/aliases.gforge-new /etc/aliases
rm /etc/aliases.gforge-new
fi
if [ -f /etc/exim4/exim4.conf.gforge-new ]
then
ucf --debconf-ok /etc/exim4/exim4.conf.gforge-new /etc/exim4/exim4.conf
rm /etc/exim4/exim4.conf.gforge-new
fi
if [ -f /etc/exim4/exim4.conf.template.gforge-new ]
then
ucf --debconf-ok /etc/exim4/exim4.conf.template.gforge-new /etc/exim4/exim4.conf.template
rm /etc/exim4/exim4.conf.template.gforge-new
fi
if [ -f /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs.gforge-new ]
then
ucf --debconf-ok /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs.gforge-new /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs
rm /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs.gforge-new
fi
db_stop
|