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

Iterating over the debconf answers using cdebconf?



How should I implement this code (currently using perl and debconf) if
I want it to work with cdebconf?

  #!/usr/bin/perl -w
  use strict;
  use warnings;
  use Debconf::Db;
  use Debconf::Template;
  use Debconf::Question;
  Debconf::Db->load;
  my $qi = Debconf::Question->iterator;
  while (my $q = $qi->iterate)
  {
      my ($name, $type, $value) = ($q->name, $q->type, $q->value);
      $value = "[undef]" if (! defined $value || "" eq $value);
      print "$name $type $value\n";
  }
  exit 0;

Anyone know?  I want to pass on some debconf values from d-i/cdebconf
to debconf in the installed system.



Reply to: