/usr/share/debconf/frontend is in debconf 1.5.66.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | #!/usr/bin/perl -w
# This file was preprocessed, do not edit!
use strict;
use Debconf::Db;
use Debconf::Template;
use Debconf::AutoSelect qw(:all);
use Debconf::Log qw(:all);
Debconf::Db->load;
debug developer => "frontend started";
my $frontend=make_frontend();
shift @ARGV if $ARGV[0] eq '--';
my $package;
my $no_title=0;
if ($ENV{DEBCONF_PACKAGE}) {
$package=$ENV{DEBCONF_PACKAGE};
}
elsif ($ARGV[0]=~m!^.*/(.*?)\.(?:postinst|postrm|prerm)$!) {
$package=$1;
my $action=$ARGV[1];
$no_title=1 if $action eq 'triggered';
}
elsif (-e "/var/lib/dpkg/tmp.ci/control") {
open (CONTROL, "< /var/lib/dpkg/tmp.ci/control")
|| die "Debconf: unable to open control file: $!";
while (<CONTROL>) {
if (/^Package: (.*)/) {
$package=$1;
last;
}
}
close CONTROL;
if (! exists $ENV{PERL_DL_NONLAZY} || ! $ENV{PERL_DL_NONLAZY}) {
warn "PERL_DL_NONLAZY is not set, if debconf is running from a preinst script, this is not safe";
}
}
else {
$package='';
debug developer => 'Trying to find a templates file..';
sub trytemplate {
my $fn=shift;
debug developer => "Trying $fn";
if (-e $fn) {
debug developer => "I guess it is $fn";
Debconf::Template->load($fn, $package);
return 1;
}
else {
return;
}
}
unless (trytemplate("$ARGV[0].templates")) {
unless ($ARGV[0]=~m/(.*)config$/ && trytemplate("${1}templates")) {
unless ($ARGV[0]=~m!^(?:.*/)?(.*)! && trytemplate("/usr/share/debconf/templates/${1}.templates")) {
debug developer => "Couldn't find a templates file."
}
}
}
}
debug developer => "frontend running, package name is $package";
$frontend->default_title($package) if length $package and !$no_title;
$frontend->info(undef);
if ($ARGV[0] =~/^(.*[.\/])(?:preinst|postinst|prerm|postrm)$/) {
my $base=$1;
my $templates=$base."templates";
Debconf::Template->load($templates, $package)
if -e $templates;
}
if ($ARGV[0] =~/^(.*[.\/])(?:postinst|preinst)$/) {
my $base=$1;
my $config=$base."config";
if (-e $config) {
my $version=$ARGV[2];
if (! defined($version)) {
$version='';
}
my $confmodule=make_confmodule($config,
"configure", $version);
$confmodule->owner($package);
1 while ($confmodule->communicate);
exit $confmodule->exitcode if $confmodule->exitcode > 0;
}
}
my $confmodule=make_confmodule(@ARGV);
$confmodule->owner($package);
1 while ($confmodule->communicate);
$frontend->shutdown;
Debconf::Db->save;
exit $confmodule->exitcode;
|