Changeset 487
- Timestamp:
- 02/22/06 00:23:18 (7 years ago)
- File:
-
- 1 edited
-
debian/postinst (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
debian/postinst
r414 r487 1 #!/bin/sh 1 #!/bin/sh -x 2 2 3 3 set -e … … 20 20 # installation fails and the `postinst' is called with `abort-upgrade', 21 21 # `abort-remove' or `abort-deconfigure'. 22 23 alternc_conf=/etc/alternc/alternc.conf 24 25 # helper to change variables in alternc.conf 26 change_var () { 27 varname=$1; shift; 28 value=$1; shift; 29 30 echo "changing var $varname to $value" 31 sed -e "s#^${varname}=.*\$#${varname}=${value}#" < $alternc_conf > $alternc_conf.$$ && \ 32 mv $alternc_conf.$$ $alternc_conf 33 } 22 34 23 35 case "$1" in … … 42 54 "alternc/data_part DATA_PART" \ 43 55 "alternc/mysql/host MYSQL_HOST" \ 44 "alternc/mysql/rootuser MYSQL_USER" \45 "alternc/mysql/rootpassword MYSQL_PASS" \46 56 "alternc/mysql/db MYSQL_DATABASE" \ 47 "alternc/mysql/user ROOT_USER" \48 "alternc/mysql/password ROOT_PASS"57 "alternc/mysql/user MYSQL_USER" \ 58 "alternc/mysql/password MYSQL_PASS" 49 59 do 50 60 skip=0 … … 66 76 #db_get alternc/ns2 67 77 78 if [ -e /etc/alternc/local.sh ]; then 79 # source local.sh variables 80 . /etc/alternc/local.sh 81 fi 82 83 # 84 # rewriting alternc.conf 85 # 86 change_var "mx" "$DEFAULT_MX" 87 change_var "DATA_PART" "$DATA_PART" 88 change_var "dbhost" "$MYSQL_HOST" 89 change_var "dbuser" "$MYSQL_USER" 90 change_var "dbpwd" "$MYSQL_PASS" 91 change_var "dbname" "$MYSQL_DATABASE" 92 change_var "myip" "$DEFAULT_IP" 93 94 echo "The following variables have been left untouched in alternc.conf" 95 echo "You will have to review those before manually launching alternc.install" 96 97 cat <<EOF 98 # variables not treated here (debconf variable) 99 # monitor_ip 100 # fqdn (desktopname) 101 # hosting (hostingname) 102 # bind_internal 103 # ns1, ns2 (idem) 104 # dnsip 105 # myrandom 106 # mynetwork 107 EOF 108 109 echo "checking for upgrades" 68 110 /usr/share/alternc/install/upgrade_check.sh $2 69 111
Note: See TracChangeset
for help on using the changeset viewer.
