[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debian/templates and Select/Choices:



Hello *,

Since my packages are working fine, I have a problem with an generated
list in "Choices:". I have a directory with plugins

        /usr/lib/tddyndns

and I want to put the files into the "Choices:" list and I have done:

----[ '/var/lib/dpkg/info/tddyndns.templates' ]-----------------------

Template: tddyndns/dd_router_type
Type: select
Choices: ${AVAILLABLE_ROUTERS}
Description: Choose the router you want to use. 
Description-de.ISO-8859-15: Wählen Sie den zu verwendenden Router aus.

----------------------------------------------------------------------

which give me after installation:

----[ '/var/cache/debconf/config.dat' ]---------------------------------

Name: tddyndns/dd_router_type
Template: tddyndns/dd_router_type
Value: 
Owners: tddyndns
Variables:
 availrouters = netgear_dm602, netgear_dm835, zyxel_2002, zyxel_761
------------------------------------------------------------------------

Which is OK.  Then I have in my

----[ '/var/lib/dpkg/info/tddyndns.config' ]-----------------------------

. /usr/share/debconf/confmodule

<snip>

  AVAILLABLE_ROUTERS=$(ls /usr/lib/tddyndns |tr "\n" "," |sed "s/,/, /g")
  db_subst tddyndns/dd_router_type availrouters "${AVAILLABLE_ROUTERS}"
  db_fset  tddyndns/dd_router_type seen false

<snip>

# Let the user go back in the configuration
db_capb backup

STATE=1
while [ "$STATE" != 0 -a "$STATE" != 18 ] ; do
  case $STATE in
  1)
        db_input medium tddyndns/dd_email_to     || true
        ;;

<snip>

  5)
        db_input medium tddyndns/dd_router_type  || true
        ;;

<snip>

  17)
        db_input medium tddyndns/dd_backmx       || true
        ;;
  esac
    if db_go ; then
      STATE=$(($STATE + 1))
    else
      STATE=$(($STATE - 1))
    fi
done

# Program End
exit 0
-------------------------------------------------------------------------

All is working fine, except 5),  :-(

I was reading /usr/share/doc/debconf-doc/tutorial-html forward and
backward but now my brain is smoking!

I was thinking, this has something to do with the variable
"availrouters" but all what I have tried does not work (for me).

Any suggestions?

Thanks, have a nice week
    Michelle Konzack


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)



Reply to: