File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/FrontEnd.zip
Back
PK ù�Z����i i Web.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Web; use IO::Socket; use IO::Select; use CGI; use strict; use Debconf::Gettext; use base qw(Debconf::FrontEnd); sub init { my $this=shift; $this->SUPER::init(@_); $this->port(8001) unless defined $this->port; $this->formid(0); $this->interactive(1); $this->capb('backup'); $this->need_tty(0); $this->server(IO::Socket::INET->new( LocalPort => $this->port, Proto => 'tcp', Listen => 1, Reuse => 1, LocalAddr => '127.0.0.1', )) || die "Can't bind to ".$this->port.": $!"; print STDERR sprintf(gettext("Note: Debconf is running in web mode. Go to http://localhost:%i/"),$this->port)."\n"; } sub client { my $this=shift; $this->{client}=shift if @_; return $this->{client} if $this->{client}; my $select=IO::Select->new($this->server); 1 while ! $select->can_read(1); my $client=$this->server->accept; my $commands=''; while (<$client>) { last if $_ eq "\r\n"; $commands.=$_; } $this->commands($commands); $this->{client}=$client; } sub closeclient { my $this=shift; close $this->client; $this->client(''); } sub showclient { my $this=shift; my $page=shift; my $client=$this->client; print $client $page; } sub go { my $this=shift; $this->backup(''); my $httpheader="HTTP/1.0 200 Ok\nContent-type: text/html\n\n"; my $form=''; my $id=0; my %idtoelt; foreach my $elt (@{$this->elements}) { $idtoelt{$id}=$elt; $elt->id($id++); my $html=$elt->show; if ($html ne '') { $form.=$html."<hr>\n"; } } return 1 if $form eq ''; my $formid=$this->formid(1 + $this->formid); $form="<html>\n<title>".$this->title."</title>\n<body>\n". "<form><input type=hidden name=formid value=$formid>\n". $form."<p>\n"; if ($this->capb_backup) { $form.="<input type=submit value=".gettext("Back")." name=back>\n"; } $form.="<input type=submit value=".gettext("Next").">\n"; $form.="</form>\n</body>\n</html>\n"; my $query; do { $this->showclient($httpheader . $form); $this->closeclient; $this->client; my @get=grep { /^GET / } split(/\r\n/, $this->commands); my $get=shift @get; my ($qs)=$get=~m/^GET\s+.*?\?(.*?)(?:\s+.*)?$/; $query=CGI->new($qs); } until (defined $query->param('formid') && $query->param('formid') eq $formid); if ($this->capb_backup && defined $query->param('back') && $query->param('back') ne '') { return ''; } foreach my $id ($query->param) { next unless $idtoelt{$id}; $idtoelt{$id}->value($query->param($id)); delete $idtoelt{$id}; } foreach my $elt (values %idtoelt) { $elt->value(''); } return 1; } 1 PK ù�ZYh� � � Noninteractive.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Noninteractive; use strict; use Debconf::Encoding qw(width wrap); use Debconf::Gettext; use base qw(Debconf::FrontEnd); sub init { my $this=shift; $this->SUPER::init(@_); $this->need_tty(0); } sub display { my $this=shift; my $text=shift; $Debconf::Encoding::columns=76; $this->display_nowrap(wrap('','',$text)); } sub display_nowrap { my $this=shift; my $text=shift; my @lines=split(/\n/, $text); push @lines, "" if $text=~/\n$/; my $title=$this->title; if (length $title) { unshift @lines, $title, ('-' x width $title), ''; $this->title(''); } foreach (@lines) { print "$_\n"; } } 1 PK ù�Z;-*�% % Teletype.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Teletype; use strict; use Debconf::Encoding qw(width wrap); use Debconf::Gettext; use Debconf::Config; use base qw(Debconf::FrontEnd::ScreenSize); sub init { my $this=shift; $this->SUPER::init(@_); $this->interactive(1); $this->linecount(0); } sub display { my $this=shift; my $text=shift; $Debconf::Encoding::columns=$this->screenwidth; $this->display_nowrap(wrap('','',$text)); } sub display_nowrap { my $this=shift; my $text=shift; return if Debconf::Config->terse eq 'true'; my @lines=split(/\n/, $text); push @lines, "" if $text=~/\n$/; my $title=$this->title; if (length $title) { unshift @lines, $title, ('-' x width $title), ''; $this->title(''); } foreach (@lines) { if (! $this->screenheight_guessed && $this->screenheight > 2 && $this->linecount($this->linecount+1) > $this->screenheight - 2) { my $resp=$this->prompt( prompt => '['.gettext("More").']', default => '', completions => [], ); if (defined $resp && $resp eq 'q') { last; } } print "$_\n"; } } sub prompt { my $this=shift; my %params=@_; $this->linecount(0); local $|=1; print "$params{prompt} "; my $ret=<STDIN>; chomp $ret if defined $ret; $this->display_nowrap("\n"); return $ret; } sub prompt_password { my $this=shift; my %params=@_; delete $params{default}; system('stty -echo 2>/dev/null'); my $ret=$this->Debconf::FrontEnd::Teletype::prompt(%params); system('stty sane 2>/dev/null'); return $ret; } 1 PK ù�Z,U`�\ \ Gnome.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Gnome; use strict; use utf8; use Debconf::Gettext; use Debconf::Config; use Debconf::Encoding qw(to_Unicode); use base qw{Debconf::FrontEnd}; our @ARGV_for_gnome=('--sm-disable'); sub create_assistant_page { my $this=shift; $this->assistant_page(Gtk3::VBox->new); $this->assistant->append_page($this->assistant_page); if ($this->logo) { $this->assistant->set_page_header_image($this->assistant_page, $this->logo); } $this->configure_assistant_page; $this->assistant_page->show_all; } sub configure_assistant_page { my $this=shift; $this->assistant->set_page_title($this->assistant_page, to_Unicode($this->title)); $this->assistant->set_page_type($this->assistant_page, 'custom'); $this->forward_button->grab_default; $this->forward_button->show; if ($this->capb_backup) { $this->back_button->show; } else { $this->back_button->hide; } $this->assistant->set_page_complete($this->assistant_page, 1); } sub reset_assistant_page { my $this=shift; $this->assistant_page($this->assistant->get_nth_page($this->assistant->get_current_page)); foreach my $element ($this->assistant_page->get_children) { $this->assistant_page->remove($element); } } my $prev_page = 0; sub prepare_callback { my ($assistant, $page, $this) = @_; my $current_page = $assistant->get_current_page; if ($prev_page < $current_page) { $this->goback(0); if (Gtk3::main_level()) { Gtk3::main_quit(); } } elsif ($prev_page > $current_page) { $this->goback(1); if (Gtk3::main_level()) { Gtk3::main_quit(); } } $prev_page = $current_page; } sub close_callback { my ($assistant) = @_; my $title = gettext("Really quit configuration?"); my $text = gettext("If you quit this configuration dialog, then the package being configured will probably fail to install, and you may have to fix it manually. This may be especially difficult if you are in the middle of a large upgrade.")."\n\n".gettext("You may need to quit anyway if you are stuck in a configuration loop due to a buggy package.")."\n"; my $quit = gettext("_Quit"); my $continue = gettext("Continue"); my $dialog = Gtk3::Dialog->new_with_buttons(to_Unicode($title), $assistant, "modal", to_Unicode($quit), "yes", to_Unicode($continue), "no"); $dialog->set_default_response("no"); $dialog->set_border_width(3); my $grid = Gtk3::Grid->new(); $grid->set_orientation("horizontal"); $grid->set_column_homogeneous(0); $dialog->get_content_area->pack_start($grid, 1, 1, 5); $grid->show; my $alignment = Gtk3::Alignment->new(0.5, 0.0, 1.0, 0.0); $grid->add($alignment); $alignment->show; my $image = Gtk3::Image->new_from_icon_name("dialog-information", "dialog"); $alignment->add($image); $image->show; my $label = Gtk3::Label->new(to_Unicode($text)); $label->set_line_wrap(1); $grid->add($label); $label->show; my $response = $dialog->run; $dialog->destroy; exit 1 if $response eq "yes"; } sub delete_event_callback { my ($assistant, $event) = @_; close_callback($assistant); } sub forward_page_func { my ($current_page, $assistant) = @_; return $current_page + 1; } sub on_forward { my ($button) = @_; my $assistant = $button->get_ancestor("Gtk3::Assistant"); $assistant->next_page; } sub on_back { my ($button) = @_; my $assistant = $button->get_ancestor("Gtk3::Assistant"); $assistant->previous_page; } sub init { my $this=shift; if (fork) { wait(); # for child if ($? != 0) { die "DISPLAY problem?\n"; } } else { use Gtk3; @ARGV=@ARGV_for_gnome; # temporary change at first Gtk3->init; my $window = Gtk3::Window->new('toplevel'); exit(0); # success } eval q{use Gtk3;}; die "Unable to load Gtk -- is libgtk3-perl installed?\n" if $@; my @gnome_sucks=@ARGV; @ARGV=@ARGV_for_gnome; Gtk3->init; @ARGV=@gnome_sucks; $this->SUPER::init(@_); $this->interactive(1); $this->capb('backup'); $this->need_tty(0); $this->assistant(Gtk3::Assistant->new); $this->assistant->set_position("center"); $this->assistant->set_default_size(600, 400); my $hostname = `hostname`; chomp $hostname; $this->assistant->set_title(to_Unicode(sprintf(gettext("Debconf on %s"), $hostname))); $this->assistant->signal_connect("delete_event", \&delete_event_callback); my $distribution=''; if (system('type lsb_release >/dev/null 2>&1') == 0) { $distribution=lc(`lsb_release -is`); chomp $distribution; } elsif (-e '/etc/debian_version') { $distribution='debian'; } my $logo="/usr/share/pixmaps/$distribution-logo.png"; if (-e $logo) { $this->logo(Gtk3::Gdk::Pixbuf->new_from_file($logo)); } $this->assistant->signal_connect("close", \&close_callback); $this->assistant->signal_connect("prepare", \&prepare_callback, $this); $this->assistant->set_forward_page_func(\&forward_page_func, $this->assistant); $this->forward_button(Gtk3::Button->new_with_mnemonic(to_Unicode(gettext("_Next")))); $this->forward_button->set_can_focus(1); $this->forward_button->set_can_default(1); $this->forward_button->set_receives_default(1); $this->forward_button->signal_connect("clicked", \&on_forward); $this->assistant->add_action_widget($this->forward_button); $this->back_button(Gtk3::Button->new_with_mnemonic(to_Unicode(gettext("_Back")))); $this->back_button->set_can_focus(1); $this->back_button->set_receives_default(1); $this->back_button->signal_connect("clicked", \&on_back); $this->assistant->add_action_widget($this->back_button); $this->create_assistant_page(); $this->assistant->show; } sub go { my $this=shift; my @elements=@{$this->elements}; $this->reset_assistant_page; my $interactive=''; foreach my $element (@elements) { next unless $element->hbox; $interactive=1; $this->assistant_page->pack_start($element->hbox, $element->fill, $element->expand, 0); } if ($interactive) { $this->configure_assistant_page; if ($this->assistant->get_current_page == $this->assistant->get_n_pages - 1) { $this->create_assistant_page(); } Gtk3::main(); } foreach my $element (@elements) { $element->show; } return '' if $this->goback; return 1; } sub progress_start { my $this=shift; $this->SUPER::progress_start(@_); $this->reset_assistant_page; my $element=$this->progress_bar; $this->assistant_page->pack_start($element->hbox, $element->fill, $element->expand, 0); $this->configure_assistant_page; if ($this->assistant->get_current_page == $this->assistant->get_n_pages - 1) { $this->create_assistant_page(); } $this->assistant->set_page_complete($this->assistant_page, 0); $this->assistant->show_all; while (Gtk3::events_pending()) { Gtk3::main_iteration(); } } sub progress_set { my $this=shift; my $ret=$this->SUPER::progress_set(@_); while (Gtk3::events_pending()) { Gtk3::main_iteration(); } return $ret; } sub progress_info { my $this=shift; my $ret=$this->SUPER::progress_info(@_); while (Gtk3::events_pending()) { Gtk3::main_iteration(); } return $ret; } sub progress_stop { my $this=shift; $this->SUPER::progress_stop(@_); while (Gtk3::events_pending) { Gtk3::main_iteration; } if ($this->assistant->get_current_page == $this->assistant->get_n_pages - 1) { $this->create_assistant_page(); } $this->assistant->set_current_page($prev_page + 1); } 1 PK ù�Z��Yq q ScreenSize.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::ScreenSize; use strict; use Debconf::Gettext; use base qw(Debconf::FrontEnd); sub init { my $this=shift; $this->SUPER::init(@_); $this->resize; # Get current screen size. $SIG{WINCH}=sub { if (defined $this) { $this->resize; } }; } sub resize { my $this=shift; if (exists $ENV{LINES}) { $this->screenheight($ENV{'LINES'}); $this->screenheight_guessed(0); } else { my ($rows)=`stty -a 2>/dev/null` =~ m/rows (\d+)/s; if ($rows) { $this->screenheight($rows); $this->screenheight_guessed(0); } else { $this->screenheight(25); $this->screenheight_guessed(1); } } if (exists $ENV{COLUMNS}) { $this->screenwidth($ENV{'COLUMNS'}); } else { my ($cols)=`stty -a 2>/dev/null` =~ m/columns (\d+)/s; $this->screenwidth($cols || 80); } } 1 PK ù�Z(��� � Text.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Text; use strict; use base qw(Debconf::FrontEnd::Readline); 1 PK ù�Z~#��� � Dialog.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Dialog; use strict; use Debconf::Gettext; use Debconf::Priority; use Debconf::TmpFile; use Debconf::Log qw(:all); use Debconf::Encoding qw(wrap $columns width); use Debconf::Path; use IPC::Open3; use POSIX; use Fcntl; use base qw(Debconf::FrontEnd::ScreenSize); sub init { my $this=shift; $this->SUPER::init(@_); delete $ENV{POSIXLY_CORRECT} if exists $ENV{POSIXLY_CORRECT}; delete $ENV{POSIX_ME_HARDER} if exists $ENV{POSIX_ME_HARDER}; if (! exists $ENV{TERM} || ! defined $ENV{TERM} || $ENV{TERM} eq '') { die gettext("TERM is not set, so the dialog frontend is not usable.")."\n"; } elsif ($ENV{TERM} =~ /emacs/i) { die gettext("Dialog frontend is incompatible with emacs shell buffers")."\n"; } elsif ($ENV{TERM} eq 'dumb' || $ENV{TERM} eq 'unknown') { die gettext("Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.")."\n"; } $this->interactive(1); $this->capb('backup'); if (Debconf::Path::find("whiptail") && (! defined $ENV{DEBCONF_FORCE_DIALOG} || ! Debconf::Path::find("dialog")) && (! defined $ENV{DEBCONF_FORCE_XDIALOG} || ! Debconf::Path::find("Xdialog")) && system('whiptail --version >/dev/null 2>&1') == 0) { $this->program('whiptail'); $this->dashsep('--'); $this->borderwidth(5); $this->borderheight(6); $this->spacer(1); $this->titlespacer(10); $this->columnspacer(3); $this->selectspacer(13); $this->hasoutputfd(1); } elsif (Debconf::Path::find("dialog") && (! defined $ENV{DEBCONF_FORCE_XDIALOG} || ! Debconf::Path::find("Xdialog")) && system('dialog --version >/dev/null 2>&1') == 0) { $this->program('dialog'); $this->dashsep(''); # dialog does not need (or support) $this->borderwidth(7); $this->borderheight(6); $this->spacer(0); $this->titlespacer(4); $this->columnspacer(2); $this->selectspacer(0); $this->hasoutputfd(1); } elsif (Debconf::Path::find("Xdialog") && defined $ENV{DISPLAY}) { $this->program("Xdialog"); $this->borderwidth(7); $this->borderheight(20); $this->spacer(0); $this->titlespacer(10); $this->selectspacer(0); $this->columnspacer(2); $this->screenheight(200); } else { die gettext("No usable dialog-like program is installed, so the dialog based frontend cannot be used."); } if ($this->screenheight < 13 || $this->screenwidth < 31) { die gettext("Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.")."\n"; } } sub sizetext { my $this=shift; my $text=shift; $columns = $this->screenwidth - $this->borderwidth - $this->columnspacer; $text=wrap('', '', $text); my @lines=split(/\n/, $text); my $window_columns=width($this->title) + $this->titlespacer; map { my $w=width($_); $window_columns = $w if $w > $window_columns; } @lines; return $text, $#lines + 1 + $this->borderheight, $window_columns + $this->borderwidth; } sub ellipsize { my $this=shift; my $text=shift; return $text if $this->program ne 'whiptail'; $columns = $this->screenwidth - $this->borderwidth - $this->columnspacer - $this->selectspacer; if (width($text) > $columns) { $columns -= 3; $text = (split(/\n/, wrap('', '', $text), 2))[0] . '...'; } return $text; } sub hide_escape { my $line = $_; $line =~ s/\\n/\\\xe2\x81\xa0n/g; return $line; } sub showtext { my $this=shift; my $question=shift; my $intext=shift; my $lines = $this->screenheight; my ($text, $height, $width)=$this->sizetext($intext); my @lines = split(/\n/, $text); my $num; my @args=('--msgbox', join("\n", @lines)); if ($lines - 4 - $this->borderheight <= $#lines) { $num=$lines - 4 - $this->borderheight; if ($this->program eq 'whiptail') { push @args, '--scrolltext'; } else { my $fh=Debconf::TmpFile::open(); print $fh join("\n", map &hide_escape, @lines); close $fh; @args=("--textbox", Debconf::TmpFile::filename()); } } else { $num=$#lines + 1; } $this->showdialog($question, @args, $num + $this->borderheight, $width); if ($args[0] eq '--textbox') { Debconf::TmpFile::cleanup(); } } sub makeprompt { my $this=shift; my $question=shift; my $freelines=$this->screenheight - $this->borderheight + 1; $freelines += shift if @_; my ($text, $lines, $columns)=$this->sizetext( $question->extended_description."\n\n". $question->description ); if ($lines > $freelines) { $this->showtext($question, $question->extended_description); ($text, $lines, $columns)=$this->sizetext($question->description); } return ($text, $lines, $columns); } sub startdialog { my $this=shift; my $question=shift; my $wantinputfd=shift; debug debug => "preparing to run dialog. Params are:" , join(",", $this->program, @_); use vars qw{*SAVEOUT *SAVEIN}; open(SAVEOUT, ">&STDOUT") || die $!; $this->dialog_saveout(\*SAVEOUT); if ($wantinputfd) { $this->dialog_savein(undef); } else { open(SAVEIN, "<&STDIN") || die $!; $this->dialog_savein(\*SAVEIN); } $this->dialog_savew($^W); $^W=0; unless ($this->capb_backup || grep { $_ eq '--defaultno' } @_) { if ($this->program ne 'Xdialog') { unshift @_, '--nocancel'; } else { unshift @_, '--no-cancel'; } } if ($this->program eq 'Xdialog' && $_[0] eq '--passwordbox') { $_[0]='--password --inputbox' } use vars qw{*OUTPUT_RDR *OUTPUT_WTR}; if ($this->hasoutputfd) { pipe(OUTPUT_RDR, OUTPUT_WTR) || die "pipe: $!"; my $flags=fcntl(\*OUTPUT_WTR, F_GETFD, 0); fcntl(\*OUTPUT_WTR, F_SETFD, $flags & ~FD_CLOEXEC); $this->dialog_output_rdr(\*OUTPUT_RDR); unshift @_, "--output-fd", fileno(\*OUTPUT_WTR); } my $backtitle=''; if (defined $this->info) { $backtitle = $this->info->description; } else { $backtitle = gettext("Package configuration"); } use vars qw{*INPUT_RDR *INPUT_WTR}; if ($wantinputfd) { pipe(INPUT_RDR, INPUT_WTR) || die "pipe: $!"; autoflush INPUT_WTR 1; my $flags=fcntl(\*INPUT_RDR, F_GETFD, 0); fcntl(\*INPUT_RDR, F_SETFD, $flags & ~FD_CLOEXEC); $this->dialog_input_wtr(\*INPUT_WTR); } else { $this->dialog_input_wtr(undef); } use vars qw{*ERRFH}; my $pid = open3($wantinputfd ? '<&INPUT_RDR' : '<&STDIN', '>&STDOUT', \*ERRFH, $this->program, '--backtitle', $backtitle, '--title', $this->title, @_); $this->dialog_errfh(\*ERRFH); $this->dialog_pid($pid); close OUTPUT_WTR if $this->hasoutputfd; } sub waitdialog { my $this=shift; my $input_wtr=$this->dialog_input_wtr; if ($input_wtr) { close $input_wtr; } my $output_rdr=$this->dialog_output_rdr; my $errfh=$this->dialog_errfh; my $output=''; if ($this->hasoutputfd) { while (<$output_rdr>) { $output.=$_; } my $error=0; while (<$errfh>) { print STDERR $_; $error++; } if ($error) { die sprintf("debconf: %s output the above errors, giving up!", $this->program)."\n"; } } else { while (<$errfh>) { # ugh $output.=$_; } } chomp $output; waitpid($this->dialog_pid, 0); $^W=$this->dialog_savew; if (defined $this->dialog_savein) { open(STDIN, '<&', $this->dialog_savein) || die $!; } open(STDOUT, '>&', $this->dialog_saveout) || die $!; my $ret=$? >> 8; if ($ret == 255 || ($ret == 1 && join(' ', @_) !~ m/--yesno\s/)) { $this->backup(1); return undef; } if (wantarray) { return $ret, $output; } else { return $output; } } sub showdialog { my $this=shift; my $question=shift; @_=map &hide_escape, @_; if (defined $this->progress_bar) { $this->progress_bar->stop; } $this->startdialog($question, 0, @_); my (@ret, $ret); if (wantarray) { @ret=$this->waitdialog(@_); } else { $ret=$this->waitdialog(@_); } if (defined $this->progress_bar) { $this->progress_bar->start; } if (wantarray) { return @ret; } else { return $ret; } } 1 PK ù�Z�]\�% % Kde.pmnu �[��� package Debconf::FrontEnd::Kde; use strict; use warnings; use IO::Handle; use Fcntl; use POSIX ":sys_wait_h"; use Debconf::Config; use base "Debconf::FrontEnd::Passthrough"; sub clear_fd_cloexec { my $fh = shift; my $flags; $flags = $fh->fcntl(F_GETFD, 0); $flags &= ~FD_CLOEXEC; $fh->fcntl(F_SETFD, $flags); } sub init { my $this = shift; $this->need_tty(0); pipe my $dc2hp_readfh, my $dc2hp_writefh; pipe my $hp2dc_readfh, my $hp2dc_writefh; my $helper_pid = fork(); if (!defined $helper_pid) { die "Unable to fork for execution of debconf-kde-helper: $!\n"; } elsif ($helper_pid == 0) { close $hp2dc_readfh; close $dc2hp_writefh; clear_fd_cloexec($dc2hp_readfh); clear_fd_cloexec($hp2dc_writefh); my $debug = Debconf::Config->debug; local $ENV{QT_LOGGING_RULES} = 'org.kde.debconf.debug=false' unless $debug && 'kde' =~ /$debug/; my $fds = sprintf("%d,%d", $dc2hp_readfh->fileno(), $hp2dc_writefh->fileno()); if (!exec("debconf-kde-helper", "--fifo-fds=$fds")) { print STDERR "Unable to execute debconf-kde-helper - is debconf-kde-helper installed?"; exit(10); } } close $dc2hp_readfh; close $hp2dc_writefh; $this->{kde_helper_pid} = $helper_pid; $this->{readfh} = $hp2dc_readfh; $this->{writefh} = $dc2hp_writefh; $this->SUPER::init(); my $timeout = 15; my $tag = $this->talk_with_timeout($timeout, "X_PING"); unless (defined $tag && $tag == 0) { close $hp2dc_readfh; close $dc2hp_writefh; if (waitpid($helper_pid, WNOHANG) == $helper_pid) { die "debconf-kde-helper terminated abnormally (exit status: " . WEXITSTATUS($?) . ")\n"; } elsif (kill(0, $helper_pid) == 1) { kill 9, $helper_pid; waitpid($helper_pid, 0); } if (defined $tag) { die "debconf-kde-helper failed to respond to ping. Response was $tag\n"; } else { die "debconf-kde-helper did not respond to ping in $timeout seconds\n"; } } } sub shutdown { my $this = shift; $this->SUPER::shutdown(); if (defined $this->{kde_helper_pid}) { waitpid $this->{kde_helper_pid}, 0; delete $this->{kde_helper_pid}; } } 1; PK ù�ZI44y� � Passthrough.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Passthrough; use strict; use Carp; use IO::Socket; use IO::Handle; use IO::Select; use Debconf::FrontEnd; use Debconf::Element; use Debconf::Element::Select; use Debconf::Element::Multiselect; use Debconf::Log qw(:all); use Debconf::Encoding; use base qw(Debconf::FrontEnd); sub init { my $this=shift; if (not defined $this->{readfh} or not defined $this->{writefh}) { if (not defined $this->init_fh_from_env()) { die "Neither DEBCONF_PIPE nor DEBCONF_READFD and DEBCONF_WRITEFD were set\n"; } } binmode $this->{readfh}, ":utf8"; binmode $this->{writefh}, ":utf8"; $this->{readfh}->autoflush(1); $this->{writefh}->autoflush(1); $this->elements([]); $this->interactive(1); $this->need_tty(0); } sub init_fh_from_env { my $this = shift; my ($socket_path, $readfd, $writefd); if (defined $ENV{DEBCONF_PIPE}) { my $socket_path = $ENV{DEBCONF_PIPE}; $this->{readfh} = $this->{writefh} = IO::Socket::UNIX->new( Type => SOCK_STREAM, Peer => $socket_path ) || croak "Cannot connect to $socket_path: $!"; return "socket"; } elsif (defined $ENV{DEBCONF_READFD} and defined $ENV{DEBCONF_WRITEFD}) { $readfd = $ENV{DEBCONF_READFD}; $writefd = $ENV{DEBCONF_WRITEFD}; $this->{readfh} = IO::Handle->new_from_fd(int($readfd), "r") or croak "Failed to open fd $readfd: $!"; $this->{writefh} = IO::Handle->new_from_fd(int($writefd), "w") or croak "Failed to open fd $writefd: $!"; return "fifo"; } return undef; } sub talk_with_timeout { my $this=shift; my $timeout=shift; my $command=join(' ', map { Debconf::Encoding::to_Unicode($_) } @_); my $reply; my $readfh = $this->{readfh} || croak "Broken pipe"; my $writefh = $this->{writefh} || croak "Broken pipe"; debug developer => "----> (passthrough) $command"; print $writefh $command."\n"; $writefh->flush; if (defined $timeout) { my $select = IO::Select->new($readfh); return undef if !$select->can_read($timeout); } return undef if ($readfh->eof()); $reply = <$readfh>; chomp($reply); debug developer => "<---- (passthrough) $reply"; my ($tag, $val) = split(' ', $reply, 2); $val = '' unless defined $val; $val = Debconf::Encoding::convert("UTF-8", $val); return ($tag, $val) if wantarray; return $tag; } sub talk { my $this=shift; return $this->talk_with_timeout(undef, @_); } sub makeelement { my $this=shift; my $question=shift; my $type=$question->type; if ($type eq "select" || $type eq "multiselect") { $type=ucfirst($type); return "Debconf::Element::$type"->new(question => $question); } else { return Debconf::Element->new(question => $question); } } sub capb_backup { my $this=shift; my $val = shift; $this->{capb_backup} = $val; $this->talk('CAPB', 'backup') if $val; } sub capb { my $this=shift; my $ret; return $this->{capb} if exists $this->{capb}; ($ret, $this->{capb}) = $this->talk('CAPB'); return $this->{capb} if $ret eq '0'; } sub title { my $this = shift; return $this->{title} unless @_; my $title = shift; $this->{title} = $title; $this->talk('TITLE', $title); } sub settitle { my $this = shift; my $question = shift; $this->{title} = $question->description; my $tag = $question->template->template; my $type = $question->template->type; my $desc = $question->description; my $extdesc = $question->extended_description; $this->talk('DATA', $tag, 'type', $type); if ($desc) { $desc =~ s/\n/\\n/g; $this->talk('DATA', $tag, 'description', $desc); } if ($extdesc) { $extdesc =~ s/\n/\\n/g; $this->talk('DATA', $tag, 'extended_description', $extdesc); } $this->talk('SETTITLE', $tag); } sub go { my $this = shift; my @elements=grep $_->visible, @{$this->elements}; foreach my $element (@elements) { my $question = $element->question; my $tag = $question->template->template; my $type = $question->template->type; my $desc = $question->description; my $extdesc = $question->extended_description; my $default; if ($type eq 'select') { $default = $element->translate_default; } elsif ($type eq 'multiselect') { $default = join ', ', $element->translate_default; } else { $default = $question->value; } $this->talk('DATA', $tag, 'type', $type); if ($desc) { $desc =~ s/\n/\\n/g; $this->talk('DATA', $tag, 'description', $desc); } if ($extdesc) { $extdesc =~ s/\n/\\n/g; $this->talk('DATA', $tag, 'extended_description', $extdesc); } if ($type eq "select" || $type eq "multiselect") { my $choices = $question->choices; $choices =~ s/\n/\\n/g if ($choices); $this->talk('DATA', $tag, 'choices', $choices); } $this->talk('SET', $tag, $default) if $default ne ''; my @vars=$Debconf::Db::config->variables($question->{name}); for my $var (@vars) { my $val=$Debconf::Db::config->getvariable($question->{name}, $var); $val='' unless defined $val; $this->talk('SUBST', $tag, $var, $val); } $this->talk('INPUT', $question->priority, $tag); } if (@elements && (scalar($this->talk('GO')) eq "30") && $this->{capb_backup}) { return; } foreach my $element (@{$this->elements}) { if ($element->visible) { my $tag = $element->question->template->template; my $type = $element->question->template->type; my ($ret, $val)=$this->talk('GET', $tag); if ($ret eq "0") { if ($type eq 'select') { $element->value($element->translate_to_C($val)); } elsif ($type eq 'multiselect') { $element->value(join(', ', map { $element->translate_to_C($_) } split(', ', $val))); } else { $element->value($val); } debug developer => "Got \"$val\" for $tag"; } } else { $element->show; } } return 1; } sub progress_data { my $this=shift; my $question=shift; my $tag=$question->template->template; my $type=$question->template->type; my $desc=$question->description; my $extdesc=$question->extended_description; $this->talk('DATA', $tag, 'type', $type); if ($desc) { $desc =~ s/\n/\\n/g; $this->talk('DATA', $tag, 'description', $desc); } if ($extdesc) { $extdesc =~ s/\n/\\n/g; $this->talk('DATA', $tag, 'extended_description', $extdesc); } } sub progress_start { my $this=shift; $this->progress_data($_[2]); return $this->talk('PROGRESS', 'START', $_[0], $_[1], $_[2]->template->template); } sub progress_set { my $this=shift; return (scalar($this->talk('PROGRESS', 'SET', $_[0])) ne "30"); } sub progress_step { my $this=shift; return (scalar($this->talk('PROGRESS', 'STEP', $_[0])) ne "30"); } sub progress_info { my $this=shift; $this->progress_data($_[0]); return (scalar($this->talk('PROGRESS', 'INFO', $_[0]->template->template)) ne "30"); } sub progress_stop { my $this=shift; return $this->talk('PROGRESS', 'STOP'); } sub shutdown { my $this=shift; $this->SUPER::shutdown(); if (defined $this->{readfh} && (not defined $this->{writefh} or $this->{readfh} != $this->{writefh})) { close $this->{readfh}; delete $this->{readfh}; } if (defined $this->{writefh}) { close $this->{writefh}; delete $this->{writefh}; } } 1 PK ù�Z��� Readline.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Readline; use strict; use Term::ReadLine; use Debconf::Gettext; use base qw(Debconf::FrontEnd::Teletype); sub init { my $this=shift; $this->SUPER::init(@_); open(TESTTY, "/dev/tty") || die gettext("This frontend requires a controlling tty.")."\n"; close TESTTY; $Term::ReadLine::termcap_nowarn = 1; # Turn off stupid termcap warning. $this->readline(Term::ReadLine->new('debconf')); $this->readline->ornaments(1); if (-p STDOUT && -p STDERR) { # make readline play nice with buffered stdout $this->readline->newTTY(*STDIN, *STDOUT); } if (Term::ReadLine->ReadLine =~ /::Gnu$/) { if (exists $ENV{TERM} && $ENV{TERM} =~ /emacs/i) { die gettext("Term::ReadLine::GNU is incompatable with emacs shell buffers.")."\n"; } $this->readline->add_defun('previous-question', sub { if ($this->capb_backup) { $this->_skip(1); $this->_direction(-1); $this->readline->stuff_char(ord "\n"); } else { $this->readline->ding; } }, ord "\cu"); $this->readline->add_defun('next-question', sub { if ($this->capb_backup) { $this->readline->stuff_char(ord "\n"); } }, ord "\cv"); $this->readline->parse_and_bind('"\e[5~": previous-question'); $this->readline->parse_and_bind('"\e[6~": next-question'); $this->capb('backup'); } if (Term::ReadLine->ReadLine =~ /::Stub$/) { $this->promptdefault(1); } } sub elementtype { return 'Teletype'; } sub go { my $this=shift; foreach my $element (grep ! $_->visible, @{$this->elements}) { my $value=$element->show; return if $this->backup && $this->capb_backup; $element->question->value($value); } my @elements=grep $_->visible, @{$this->elements}; unless (@elements) { $this->_didbackup(''); return 1; } my $current=$this->_didbackup ? $#elements : 0; $this->_direction(1); for (; $current > -1 && $current < @elements; $current += $this->_direction) { my $value=$elements[$current]->show; } if ($current < 0) { $this->_didbackup(1); return; } else { $this->_didbackup(''); return 1; } } sub prompt { my $this=shift; my %params=@_; my $prompt=$params{prompt}." "; my $default=$params{default}; my $noshowdefault=$params{noshowdefault}; my $completions=$params{completions}; if ($completions) { my @matches; $this->readline->Attribs->{completion_entry_function} = sub { my $text=shift; my $state=shift; if ($state == 0) { @matches=(); foreach (@{$completions}) { push @matches, $_ if /^\Q$text\E/i; } } return pop @matches; }; } else { $this->readline->Attribs->{completion_entry_function} = undef; } if (exists $params{completion_append_character}) { $this->readline->Attribs->{completion_append_character}=$params{completion_append_character}; } else { $this->readline->Attribs->{completion_append_character}=''; } $this->linecount(0); my $ret; $this->_skip(0); if (! $noshowdefault) { $ret=$this->readline->readline($prompt, $default); } else { $ret=$this->readline->readline($prompt); } $this->display_nowrap("\n"); return if $this->_skip; $this->_direction(1); $this->readline->addhistory($ret); return $ret; } sub prompt_password { my $this=shift; my %params=@_; if (Term::ReadLine->ReadLine =~ /::Perl$/) { return $this->SUPER::prompt_password(%params); } delete $params{default}; system('stty -echo 2>/dev/null'); my $ret=$this->prompt(@_, noshowdefault => 1, completions => []); system('stty sane 2>/dev/null'); print "\n"; return $ret; } 1 PK ù�Znu u Editor.pmnu �[��� #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::FrontEnd::Editor; use strict; use Debconf::Encoding q(wrap); use Debconf::TmpFile; use Debconf::Gettext; use base qw(Debconf::FrontEnd::ScreenSize); my $fh; sub init { my $this=shift; $this->SUPER::init(@_); $this->interactive(1); } sub comment { my $this=shift; my $comment=shift; print $fh wrap('# ','# ',$comment); $this->filecontents(1); } sub divider { my $this=shift; print $fh ("\n".('#' x ($this->screenwidth - 1))."\n"); } sub item { my $this=shift; my $name=shift; my $value=shift; print $fh "$name=\"$value\"\n\n"; $this->filecontents(1); } sub go { my $this=shift; my @elements=@{$this->elements}; return 1 unless @elements; $fh = Debconf::TmpFile::open('.sh'); $this->comment(gettext("You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions.")); $this->divider; print $fh ("\n"); $this->filecontents(''); foreach my $element (@elements) { $element->show; } if (! $this->filecontents) { Debconf::TmpFile::cleanup(); return 1; } $this->divider; $this->comment(gettext("The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to configure the system.")); print $fh ("\n"); close $fh; my $editor=$ENV{EDITOR} || $ENV{VISUAL} || '/usr/bin/editor'; system "$editor ".Debconf::TmpFile->filename; my %eltname=map { $_->question->name => $_ } @elements; open (IN, "<".Debconf::TmpFile::filename()); while (<IN>) { next if /^\s*#/; if (/(.*?)="(.*)"/ && $eltname{$1}) { $eltname{$1}->value($2); } } close IN; Debconf::TmpFile::cleanup(); return 1; } sub screenwidth { my $this=shift; $Debconf::Encoding::columns=$this->SUPER::screenwidth(@_); } 1 PK ù�Z����i i Web.pmnu �[��� PK ù�ZYh� � � � Noninteractive.pmnu �[��� PK ù�Z;-*�% % � Teletype.pmnu �[��� PK ù�Z,U`�\ \ Gnome.pmnu �[��� PK ù�Z��Yq q �1 ScreenSize.pmnu �[��� PK ù�Z(��� � `5 Text.pmnu �[��� PK ù�Z~#��� � 26 Dialog.pmnu �[��� PK ù�Z�]\�% % U Kde.pmnu �[��� PK ù�ZI44y� � _] Passthrough.pmnu �[��� PK ù�Z��� �y Readline.pmnu �[��� PK ù�Znu u � Editor.pmnu �[��� PK / ��
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings