Server IP : 85.214.239.14 / Your IP : 3.128.95.37 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/cwd/proc/2/cwd/bin/ |
Upload File : |
#!/usr/bin/perl =head1 NAME debconf-get-selections - output contents of debconf database =head1 SYNOPSIS debconf-get-selections [--installer] =head1 DESCRIPTION Output the current debconf database in a format understandable by debconf-set-selections. To dump the debconf database of the debian-installer, from /var/log/installer/cdebconf, use the --installer parameter. =cut use strict; use warnings; use Debconf::Db; use Debconf::Template; use Debconf::Question; Debconf::Db->load(readonly => "true"); my $defaultowner="unknown"; if (@ARGV && $ARGV[0] eq '--installer') { # A bit of a hack.. my $di_path; if (-d "/var/log/installer") { $di_path="/var/log/installer/cdebconf"; } else { $di_path="/var/log/debian-installer/cdebconf"; } $Debconf::Db::config=Debconf::Db->makedriver( driver => "File", name => "di_questions", filename => "$di_path/questions.dat", readonly => "true", ); $Debconf::Db::templates=Debconf::Db->makedriver( driver => "File", name => "di_templates", filename => "$di_path/templates.dat", readonly => "true", ); $defaultowner="d-i"; } my $qi = Debconf::Question->iterator; my @qs; while (my $q = $qi->iterate) { push @qs, $q; } for my $q (sort { $a->name cmp $b->name } @qs) { my ($name, $type, $value) = ($q->name, $q->type, $q->value); next if (! length $type || $type eq 'text' || $type eq 'title'); print "# ".$q->description."\n"; if ($q->type eq 'select' || $q->type eq 'multiselect') { print "# Choices: ".join(", ", $q->choices)."\n"; } if ($q->owners) { foreach my $owner (split ", ", $q->owners) { print "$owner\t$name\t$type\t$value\n"; } } else { print "$defaultowner\t$name\t$type\t$value\n"; } } =head1 AUTHOR Petter Reinholdtsen <pere@hungry.com> =cut