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

problems with debconf scripts



Hello,

I'm trying to write some configuration script using debconf, but I'm
stuck in one moment: I got one template, that should be used multiple
times, and I need to save some values with use of this template. It
looks merely so:

for foo in $list_of_some_values
  db_fset package/template isdefault true
  db_set package/template parameter $foo
  if db_get package/template value_$foo; then
    db_subst package/template default $RET
  else
    db_get package/template previous
    db_subst package/template default $RET
  fi

  db_input $LEVEL package/template
  db_go

  db_get package/template; _ret_value=$RET
  db_subst package/value value_$foo $_ret_value
  db_subst package/value previous $_ret_value

  do_something_with_the_ret_value
done

Theoretically (in my theory) it should work in that way: subst
`default' with value of value_$foo if it exists _OR_ (if value_$foo
don't exist) use previously entered value (previously means `entered in
previous loop turn'). The problem: only the previously entered value is
used, even if the value_$foo exists in debconf database. I'm really
stuck here, because I can't see, where the error is. Maybe I don't
understand the way debconf works...

sincerely,
Jubal

-- 
[ Miros/law L Baran, baran-at-knm-org-pl, neg IQ, cert AI ] [ 0101010 is ]
[ BOF2510053411, makabra.knm.org.pl/~baran/, alchemy pany ] [ The Answer ]

 Alliance: In international politics, the union of two thieves who have
 their hands so deeply inserted in each other's pocket that they cannot
 separately plunder a third.


Reply to: