REDROOM
PHP 8.5.2
Path:
Logout
Edit File
Size: 1.96 KB
Close
//usr/share/debconf/fix_db.pl
Text
Base64
#!/usr/bin/perl # This file was preprocessed, do not edit! use warnings; use strict; use Debconf::Db; use Debconf::Log q{warn}; Debconf::Db->load; if (! @ARGV || $ARGV[0] ne 'end') { my $fix=0; my $ok; my $counter=0; do { $ok=1; my %templates=(); my $ti=$Debconf::Db::templates->iterator; while (my $t=$ti->iterate) { $templates{$t}=Debconf::Template->get($t); } my %questions=(); my $qi=Debconf::Question->iterator; while (my $q=$qi->iterate) { if (! defined $q->template) { warn "question \"".$q->name."\" has no template field; removing it."; $q->addowner("killme",""); # make sure it has one owner at least, so removal is triggered foreach my $owner (split(/, /, $q->owners)) { $q->removeowner($owner); } $ok=0; $fix=1; } elsif (! exists $templates{$q->template->template}) { warn "question \"".$q->name."\" uses nonexistent template ".$q->template->template."; removing it."; foreach my $owner (split(/, /, $q->owners)) { $q->removeowner($owner); } $ok=0; $fix=1; } else { $questions{$q->name}=$q; } } foreach my $t (keys %templates) { my @owners=$Debconf::Db::templates->owners($t); if (! @owners) { warn "template \"$t\" has no owners; removing it."; $Debconf::Db::templates->addowner($t, "killme",""); $Debconf::Db::templates->removeowner($t, "killme"); $fix=1; } foreach my $q (@owners) { if (! exists $questions{$q}) { warn "template \"$t\" claims to be used by nonexistent question \"$q\"; removing that."; $Debconf::Db::templates->removeowner($t, $q); $ok=0; $fix=1; } } } $counter++; } until ($ok || $counter > 20); if ($fix) { Debconf::Db->save; exec($0, "end"); die "exec of self failed"; } } foreach my $templatefile (glob("/var/lib/dpkg/info/*.templates")) { my ($package) = $templatefile =~ m:/var/lib/dpkg/info/(.*?).templates:; Debconf::Template->load($templatefile, $package); } Debconf::Db->save;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
confmodule
2.59 KB
lrw-r--r--
2024-04-12 12:40:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
confmodule.sh
2.67 KB
lrw-r--r--
2024-04-12 12:40:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
debconf.conf
414 B
lrw-r--r--
2024-04-12 12:40:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fix_db.pl
1.96 KB
lrwxr-xr-x
2024-04-12 12:40:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
frontend
2.46 KB
lrwxr-xr-x
2024-04-12 12:40:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).