#!/bin/sh # Source debconf library. . /usr/share/debconf/confmodule db_version 2.0 db_capb backup STATE=1 while [ "$STATE" != 0 -a "$STATE" != 8 ] do case "$STATE" in 1) db_input medium mtop/mysql_server || true if db_go then db_get mtop/mysql_server || true if [ ! -z "$RET" ] then STATE=2 fi else STATE=0 fi ;; 2) db_input low mtop/mysql_port || true if db_go then db_get mtop/mysql_port || true if [ ! -z "$RET" ] then STATE=3 fi else STATE=1 fi ;; 3) db_input medium mtop/root || true if db_go then db_get mtop/root || true if [ ! -z "$RET" ] then STATE=4 fi else STATE=2 fi ;; 4) db_input medium mtop/password || true if db_go then db_get mtop/password || true STATE=8 else STATE=3 fi ;; esac done if [ "$STATE" = 0 ] then exit 1 fi