Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
snap /
gnome-42-2204 /
202 /
usr /
bin /
[ HOME SHELL ]
Name
Size
Permission
Action
X11
[ DIR ]
drwxr-xr-x
aclocal-1.16
35.18
KB
-rwxr-xr-x
appstreamcli
118.23
KB
-rwxr-xr-x
appstream-compose
26.3
KB
-rwxr-xr-x
appstream-util
98.3
KB
-rwxr-xr-x
autoconf
14.85
KB
-rwxr-xr-x
autoheader
8.82
KB
-rwxr-xr-x
autom4te
32.69
KB
-rwxr-xr-x
automake-1.16
255.91
KB
-rwxr-xr-x
autoreconf
26.3
KB
-rwxr-xr-x
autoscan
16.77
KB
-rwxr-xr-x
autoupdate
33.22
KB
-rwxr-xr-x
broadwayd
130.21
KB
-rwxr-xr-x
bwrap
70.47
KB
-rwxr-xr-x
c89-gcc
428
B
-rwxr-xr-x
c99-gcc
454
B
-rwxr-xr-x
cairo-trace
2.95
KB
-rwxr-xr-x
canberra-gtk-play
18.2
KB
-rwxr-xr-x
corelist
15.01
KB
-rwxr-xr-x
cpan
8.16
KB
-rwxr-xr-x
cpan5.34-x86_64-linux-gnu
8.18
KB
-rwxr-xr-x
curl-config
6.52
KB
-rwxr-xr-x
dazzle-list-counters
14.13
KB
-rwxr-xr-x
debconf
2.79
KB
-rwxr-xr-x
debconf-apt-progress
11.27
KB
-rwxr-xr-x
debconf-communicate
608
B
-rwxr-xr-x
debconf-copydb
1.68
KB
-rwxr-xr-x
debconf-escape
647
B
-rwxr-xr-x
debconf-set-selections
2.92
KB
-rwxr-xr-x
debconf-show
1.78
KB
-rwxr-xr-x
derb
26.88
KB
-rwxr-xr-x
desktop-file-edit
96.44
KB
-rwxr-xr-x
desktop-file-install
96.44
KB
-rwxr-xr-x
desktop-file-validate
76.69
KB
-rwxr-xr-x
dh_autotools-dev_restoreconfig
1.79
KB
-rwxr-xr-x
dh_autotools-dev_updateconfig
1.81
KB
-rwxr-xr-x
dh_girepository
12.88
KB
-rwxr-xr-x
dumpsexp
18.3
KB
-rwxr-xr-x
enc2xs
40.84
KB
-rwxr-xr-x
encguess
3.01
KB
-rwxr-xr-x
envsubst
34.38
KB
-rwxr-xr-x
fc-cache
22.23
KB
-rwxr-xr-x
fc-cat
18.23
KB
-rwxr-xr-x
fc-conflist
14.23
KB
-rwxr-xr-x
fc-list
14.23
KB
-rwxr-xr-x
fc-match
14.23
KB
-rwxr-xr-x
fc-pattern
14.23
KB
-rwxr-xr-x
fc-query
14.23
KB
-rwxr-xr-x
fc-scan
14.23
KB
-rwxr-xr-x
fc-validate
14.23
KB
-rwxr-xr-x
file
26.56
KB
-rwxr-xr-x
fribidi
26.99
KB
-rwxr-xr-x
gapplication
22.21
KB
-rwxr-xr-x
gdbus
54.21
KB
-rwxr-xr-x
gdbus-codegen
1.99
KB
-rwxr-xr-x
gdk-pixbuf-csource
14.15
KB
-rwxr-xr-x
gdk-pixbuf-pixdata
14.13
KB
-rwxr-xr-x
gdk-pixbuf-thumbnailer
18.21
KB
-rwxr-xr-x
genbrk
14.78
KB
-rwxr-xr-x
gencat
26.37
KB
-rwxr-xr-x
gencfu
14.73
KB
-rwxr-xr-x
gencnval
26.61
KB
-rwxr-xr-x
gendict
26.78
KB
-rwxr-xr-x
genrb
147.91
KB
-rwxr-xr-x
getconf
34.29
KB
-rwxr-xr-x
getent
38.65
KB
-rwxr-xr-x
gettext
34.38
KB
-rwxr-xr-x
gettextize
41.28
KB
-rwxr-xr-x
gettext.sh
5.07
KB
-rwxr-xr-x
gio
102.23
KB
-rwxr-xr-x
gio-querymodules
18.13
KB
-rwxr-xr-x
gjs
26.7
KB
-rwxr-xr-x
gjs-console
26.7
KB
-rwxr-xr-x
glib-compile-schemas
66.21
KB
-rwxr-xr-x
gobject-query
14.14
KB
-rwxr-xr-x
gpg-error-config
2.04
KB
-rwxr-xr-x
gpgrt-config
13.11
KB
-rwxr-xr-x
gresource
26.13
KB
-rwxr-xr-x
gsettings
30.21
KB
-rwxr-xr-x
gsound-play
18.21
KB
-rwxr-xr-x
gtk4-broadwayd
150.22
KB
-rwxr-xr-x
gtk4-encode-symbolic-svg
8.58
MB
-rwxr-xr-x
gtk4-launch
18.29
KB
-rwxr-xr-x
gtk4-query-settings
14.13
KB
-rwxr-xr-x
gtk4-rendernode-tool
30.13
KB
-rwxr-xr-x
gtk-encode-symbolic-svg
22.24
KB
-rwxr-xr-x
gtk-launch
18.29
KB
-rwxr-xr-x
gtk-query-settings
14.13
KB
-rwxr-xr-x
gtk-update-icon-cache
38.57
KB
-rwxr-xr-x
hb-info
54.21
KB
-rwxr-xr-x
hb-ot-shape-closure
46.21
KB
-rwxr-xr-x
hb-shape
50.21
KB
-rwxr-xr-x
hb-subset
46.18
KB
-rwxr-xr-x
hb-view
82.35
KB
-rwxr-xr-x
hmac256
18.7
KB
-rwxr-xr-x
iconv
66.41
KB
-rwxr-xr-x
icuexportdata
30.98
KB
-rwxr-xr-x
icuinfo
14.62
KB
-rwxr-xr-x
ifnames
4.08
KB
-rwxr-xr-x
instmodsh
4.27
KB
-rwxr-xr-x
ispell-wrapper
7.05
KB
-rwxr-xr-x
itstool
67.8
KB
-rwxr-xr-x
js102
28.97
MB
-rwxr-xr-x
js102-config
2.03
KB
-rwxr-xr-x
json-glib-format
18.38
KB
-rwxr-xr-x
json-glib-validate
14.24
KB
-rwxr-xr-x
json_pp
4.88
KB
-rwxr-xr-x
ldd
5.32
KB
-rwxr-xr-x
libgcrypt-config
4.52
KB
-rwxr-xr-x
libinput
62.35
KB
-rwxr-xr-x
libnetcfg
15.41
KB
-rwxr-xr-x
libpng16-config
2.41
KB
-rwxr-xr-x
libpng-config
2.41
KB
-rwxr-xr-x
libtool
366.5
KB
-rwxr-xr-x
libtoolize
128.35
KB
-rwxr-xr-x
libwacom-list-devices
14.24
KB
-rwxr-xr-x
libwacom-list-local-devices
18.29
KB
-rwxr-xr-x
libwacom-show-stylus
5.99
KB
-rwxr-xr-x
libwacom-update-db
8.99
KB
-rwxr-xr-x
locale
57.56
KB
-rwxr-xr-x
localedef
326.96
KB
-rwxr-xr-x
lzmainfo
14.23
KB
-rwxr-xr-x
m4
154.37
KB
-rwxr-xr-x
makeconv
50.89
KB
-rwxr-xr-x
mako-render
961
B
-rwxr-xr-x
markdown_py
973
B
-rwxr-xr-x
mpicalc
22.3
KB
-rwxr-xr-x
msgattrib
26.38
KB
-rwxr-xr-x
msgcat
26.38
KB
-rwxr-xr-x
msgcmp
26.38
KB
-rwxr-xr-x
msgcomm
26.38
KB
-rwxr-xr-x
msgconv
22.38
KB
-rwxr-xr-x
msgen
22.38
KB
-rwxr-xr-x
msgexec
22.38
KB
-rwxr-xr-x
msgfilter
34.38
KB
-rwxr-xr-x
msgfmt
82.59
KB
-rwxr-xr-x
msggrep
114.46
KB
-rwxr-xr-x
msginit
66.39
KB
-rwxr-xr-x
msgmerge
74.41
KB
-rwxr-xr-x
msgunfmt
34.39
KB
-rwxr-xr-x
msguniq
22.38
KB
-rwxr-xr-x
ngettext
34.38
KB
-rwxr-xr-x
nspr-config
2.58
KB
-rwxr-xr-x
nss-config
2.31
KB
-rwxr-xr-x
p11-kit
170.45
KB
-rwxr-xr-x
pango-list
18.13
KB
-rwxr-xr-x
pango-segmentation
18.21
KB
-rwxr-xr-x
pango-view
66.42
KB
-rwxr-xr-x
pcre2-config
1.93
KB
-rwxr-xr-x
pcre-config
2.29
KB
-rwxr-xr-x
pdfattach
22.21
KB
-rwxr-xr-x
pdfdetach
26.32
KB
-rwxr-xr-x
pdffonts
22.33
KB
-rwxr-xr-x
pdfimages
42.33
KB
-rwxr-xr-x
pdfinfo
62.33
KB
-rwxr-xr-x
pdfseparate
22.21
KB
-rwxr-xr-x
pdfsig
42.6
KB
-rwxr-xr-x
pdftocairo
190.3
KB
-rwxr-xr-x
pdftohtml
118.23
KB
-rwxr-xr-x
pdftoppm
34.24
KB
-rwxr-xr-x
pdftops
34.34
KB
-rwxr-xr-x
pdftotext
50.34
KB
-rwxr-xr-x
pdfunite
34.21
KB
-rwxr-xr-x
perl5.34-x86_64-linux-gnu
14.3
KB
-rwxr-xr-x
perlbug
44.12
KB
-rwxr-xr-x
perldoc
125
B
-rwxr-xr-x
perlivp
10.61
KB
-rwxr-xr-x
perlthanks
44.12
KB
-rwxr-xr-x
piconv
8.16
KB
-rwxr-xr-x
pip
225
B
-rwxr-xr-x
pip3
225
B
-rwxr-xr-x
pip3.10
225
B
-rwxr-xr-x
pipewire
14.38
KB
-rwxr-xr-x
pkgdata
43.53
KB
-rwxr-xr-x
pldd
22.37
KB
-rwxr-xr-x
pod2html
4.04
KB
-rwxr-xr-x
pod2man
14.68
KB
-rwxr-xr-x
pod2text
10.55
KB
-rwxr-xr-x
pod2usage
4.01
KB
-rwxr-xr-x
podchecker
3.57
KB
-rwxr-xr-x
psl
22.16
KB
-rwxr-xr-x
psl-make-dafsa
22.21
KB
-rwxr-xr-x
ptar
3.48
KB
-rwxr-xr-x
ptardiff
2.58
KB
-rwxr-xr-x
ptargrep
4.29
KB
-rwxr-xr-x
pw-cat
138.38
KB
-rwxr-xr-x
pw-cli
134.38
KB
-rwxr-xr-x
pw-dot
34.38
KB
-rwxr-xr-x
pw-dsdplay
138.38
KB
-rwxr-xr-x
pw-dump
94.38
KB
-rwxr-xr-x
pw-link
30.38
KB
-rwxr-xr-x
pw-loopback
18.38
KB
-rwxr-xr-x
pw-metadata
14.38
KB
-rwxr-xr-x
pw-mididump
34.38
KB
-rwxr-xr-x
pw-midiplay
138.38
KB
-rwxr-xr-x
pw-midirecord
138.38
KB
-rwxr-xr-x
pw-mon
90.42
KB
-rwxr-xr-x
pw-play
138.38
KB
-rwxr-xr-x
pw-profiler
26.38
KB
-rwxr-xr-x
pw-record
138.38
KB
-rwxr-xr-x
pw-reserve
26.38
KB
-rwxr-xr-x
pw-top
30.38
KB
-rwxr-xr-x
pw-v4l2
1.95
KB
-rwxr-xr-x
py3compile
12.89
KB
-rwxr-xr-x
py3versions
11.63
KB
-rwxr-xr-x
python3.10
5.67
MB
-rwxr-xr-x
recode-sr-latin
14.38
KB
-rwxr-xr-x
rsvg-convert
5.53
MB
-rwxr-xr-x
secret-tool
22.21
KB
-rwxr-xr-x
select-default-iwrap
474
B
-rwxr-xr-x
session-migration
22.15
KB
-rwxr-xr-x
shasum
9.75
KB
-rwxr-xr-x
spa-acp-tool
268.12
KB
-rwxr-xr-x
spa-inspect
78.48
KB
-rwxr-xr-x
spa-json-dump
14.3
KB
-rwxr-xr-x
spa-monitor
14.48
KB
-rwxr-xr-x
spa-resample
30.6
KB
-rwxr-xr-x
splain
18.96
KB
-rwxr-xr-x
streamzip
7.75
KB
-rwxr-xr-x
tzselect
15.02
KB
-rwxr-xr-x
uconv
54.83
KB
-rwxr-xr-x
unxz
82.52
KB
-rwxr-xr-x
update-desktop-database
22.38
KB
-rwxr-xr-x
update-mime-database
58.23
KB
-rwxr-xr-x
xdg-dbus-proxy
50.14
KB
-rwxr-xr-x
xdg-user-dir
234
B
-rwxr-xr-x
xdg-user-dirs-update
26.23
KB
-rwxr-xr-x
xml2-config
1.44
KB
-rwxr-xr-x
xmlcatalog
22.3
KB
-rwxr-xr-x
xmllint
78.95
KB
-rwxr-xr-x
xz
82.52
KB
-rwxr-xr-x
xzcat
82.52
KB
-rwxr-xr-x
xzcmp
6.86
KB
-rwxr-xr-x
xzdiff
6.86
KB
-rwxr-xr-x
xzegrep
5.87
KB
-rwxr-xr-x
xzfgrep
5.87
KB
-rwxr-xr-x
xzgrep
5.87
KB
-rwxr-xr-x
xzless
1.76
KB
-rwxr-xr-x
xzmore
2.11
KB
-rwxr-xr-x
zdump
26.21
KB
-rwxr-xr-x
zipdetails
58.66
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : debconf-apt-progress
#!/usr/bin/perl -w # This file was preprocessed, do not edit! use strict; use POSIX; use Fcntl; use Getopt::Long; use Debconf::Client::ConfModule (); my ($config, $start, $from, $to, $stop); my $progress=1; my $dlwaypoint=15; my ($logfile, $logstderr); my $had_frontend; sub checkopen (@) { my $file = $_[0]; my $fd = POSIX::open($file, &POSIX::O_RDONLY); defined $fd or die "$0: can't open $_[0]: $!\n"; return $fd; } sub checkclose ($) { my $fd = $_[0]; unless (POSIX::close($fd)) { return if $! == &POSIX::EBADF; die "$0: can't close fd $fd: $!\n"; } } sub checkdup2 ($$) { my ($oldfd, $newfd) = @_; checkclose($newfd); POSIX::dup2($oldfd, $newfd) or die "$0: can't dup fd $oldfd to $newfd: $!\n"; } sub nocloexec (*) { my $fh = shift; my $flags = fcntl($fh, F_GETFD, 0); fcntl($fh, F_SETFD, $flags & ~FD_CLOEXEC); } sub nonblock (*) { my $fh = shift; my $flags = fcntl($fh, F_GETFL, 0); fcntl($fh, F_SETFL, $flags | O_NONBLOCK); } sub reservefds (@) { my $null = checkopen('/dev/null'); my $close = 1; for my $fd (@_) { if ($null == $fd) { $close = 0; } else { checkclose($fd); checkdup2($null, $fd); } } if ($close) { checkclose($null); } } sub envnonempty ($) { my $name = shift; return (exists $ENV{$name} and $ENV{$name} ne ''); } sub start_debconf (@) { if (! $ENV{DEBIAN_HAS_FRONTEND}) { if (envnonempty('DEBCONF_DB_REPLACE')) { $ENV{DEBCONF_APT_PROGRESS_DB_REPLACE} = $ENV{DEBCONF_DB_REPLACE}; } if (envnonempty('DEBCONF_DB_OVERRIDE')) { $ENV{DEBCONF_APT_PROGRESS_DB_OVERRIDE} = $ENV{DEBCONF_DB_OVERRIDE}; } $ENV{DEBCONF_DB_REPLACE} = 'configdb'; $ENV{DEBCONF_DB_OVERRIDE} = 'Pipe{infd:none outfd:none}'; $ENV{DEBCONF_APT_PROGRESS_NO_FRONTEND} = 1; @ARGV = @_; } import Debconf::Client::ConfModule; } sub passthrough (@) { my $priority = Debconf::Client::ConfModule::get('debconf/priority'); defined(my $pid = fork) or die "$0: can't fork: $!\n"; if (!$pid) { close STATUS_READ; close COMMAND_WRITE; close DEBCONF_COMMAND_READ; close DEBCONF_REPLY_WRITE; $^F = 6; # avoid close-on-exec if (fileno(COMMAND_READ) != 0) { checkdup2(fileno(COMMAND_READ), 0); close COMMAND_READ; } if (fileno(APT_LOG) != 1) { checkclose(1); checkdup2(fileno(APT_LOG), 1); } if (fileno(APT_LOG) != 2) { checkclose(2); checkdup2(fileno(APT_LOG), 2); } close APT_LOG; delete $ENV{DEBIAN_HAS_FRONTEND}; delete $ENV{DEBCONF_REDIR}; delete $ENV{DEBCONF_SYSTEMRC}; delete $ENV{DEBCONF_PIPE}; # just in case ... $ENV{DEBIAN_FRONTEND} = 'passthrough'; $ENV{DEBIAN_PRIORITY} = $priority; $ENV{DEBCONF_READFD} = 5; $ENV{DEBCONF_WRITEFD} = 6; $ENV{APT_LISTCHANGES_FRONTEND} = 'none'; if ($had_frontend) { $ENV{DEBCONF_DB_REPLACE} = 'configdb'; $ENV{DEBCONF_DB_OVERRIDE} = 'Pipe{infd:none outfd:none}'; } exec @_; } close STATUS_WRITE; close COMMAND_READ; close DEBCONF_COMMAND_WRITE; close DEBCONF_REPLY_READ; return $pid; } sub handle_status ($$$) { my ($from, $to, $line) = @_; my ($status, $pkg, $percent, $description) = split ':', $line, 4; my ($min, $len); if ($status eq 'dlstatus') { $min = 0; $len = $dlwaypoint; } elsif ($status eq 'pmstatus') { $min = $dlwaypoint; $len = 100 - $dlwaypoint; } elsif ($status eq 'media-change') { Debconf::Client::ConfModule::subst( 'debconf-apt-progress/media-change', 'MESSAGE', $description); my @ret = Debconf::Client::ConfModule::input( 'critical', 'debconf-apt-progress/media-change'); $ret[0] == 0 or die "Can't display media change request!\n"; Debconf::Client::ConfModule::go(); print COMMAND_WRITE "\n" || die "can't talk to command fd: $!"; return; } else { return; } $percent = ($percent * $len / 100 + $min); $percent = ($percent * ($to - $from) / 100 + $from); $percent =~ s/\..*//; if ($progress) { my @ret=Debconf::Client::ConfModule::progress('SET', $percent); if ($ret[0] eq '30') { cancel(); } } Debconf::Client::ConfModule::subst( 'debconf-apt-progress/info', 'DESCRIPTION', $description); my @ret=Debconf::Client::ConfModule::progress( 'INFO', 'debconf-apt-progress/info'); if ($ret[0] eq '30') { cancel(); } } sub handle_debconf_command ($) { my $line = shift; print "$line\n" || die "can't write to stdout: $!"; my $ret = <STDIN>; chomp $ret; print DEBCONF_REPLY_WRITE "$ret\n" || die "can't write to DEBCONF_REPLY_WRITE: $!"; } my $pid; sub run_progress ($$@) { my $from = shift; my $to = shift; my $command = shift; local (*STATUS_READ, *STATUS_WRITE); local (*COMMAND_READ, *COMMAND_WRITE); local (*DEBCONF_COMMAND_READ, *DEBCONF_COMMAND_WRITE); local (*DEBCONF_REPLY_READ, *DEBCONF_REPLY_WRITE); local *APT_LOG; use IO::Handle; if ($progress) { my @ret=Debconf::Client::ConfModule::progress( 'INFO', 'debconf-apt-progress/preparing'); if ($ret[0] eq '30') { cancel(); return 30; } } reservefds(4, 5, 6); pipe STATUS_READ, STATUS_WRITE or die "$0: can't create status pipe: $!"; nonblock(\*STATUS_READ); checkdup2(fileno(STATUS_WRITE), 4); open STATUS_WRITE, '>&=4' or die "$0: can't reopen STATUS_WRITE as fd 4: $!"; nocloexec(\*STATUS_WRITE); pipe COMMAND_READ, COMMAND_WRITE or die "$0: can't create command pipe: $!"; nocloexec(\*COMMAND_READ); COMMAND_WRITE->autoflush(1); pipe DEBCONF_COMMAND_READ, DEBCONF_COMMAND_WRITE or die "$0: can't create debconf command pipe: $!"; nonblock(\*DEBCONF_COMMAND_READ); checkdup2(fileno(DEBCONF_COMMAND_WRITE), 6); open DEBCONF_COMMAND_WRITE, '>&=6' or die "$0: can't reopen DEBCONF_COMMAND_WRITE as fd 6: $!"; nocloexec(\*DEBCONF_COMMAND_WRITE); pipe DEBCONF_REPLY_READ, DEBCONF_REPLY_WRITE or die "$0: can't create debconf reply pipe: $!"; checkdup2(fileno(DEBCONF_REPLY_READ), 5); open DEBCONF_REPLY_READ, '<&=5' or die "$0: can't reopen DEBCONF_REPLY_READ as fd 5: $!"; nocloexec(\*DEBCONF_REPLY_READ); DEBCONF_REPLY_WRITE->autoflush(1); if (defined $logfile) { open APT_LOG, '>>', $logfile or die "$0: can't open $logfile: $!"; } elsif ($logstderr) { open APT_LOG, '>&STDERR' or die "$0: can't duplicate stderr: $!"; } else { open APT_LOG, '>', '/dev/null' or die "$0: can't open /dev/null: $!"; } nocloexec(\*APT_LOG); $pid = passthrough $command, '-o', 'APT::Status-Fd=4', '-o', 'APT::Keep-Fds::=5', '-o', 'APT::Keep-Fds::=6', @_; my $status_eof = 0; my $debconf_command_eof = 0; my $status_buf = ''; my $debconf_command_buf = ''; while (not $status_eof) { my $rin = ''; my $rout; vec($rin, fileno(STATUS_READ), 1) = 1; vec($rin, fileno(DEBCONF_COMMAND_READ), 1) = 1 unless $debconf_command_eof; my $sel = select($rout = $rin, undef, undef, undef); if ($sel < 0) { next if $! == &POSIX::EINTR; die "$0: select failed: $!"; } if (vec($rout, fileno(STATUS_READ), 1) == 1) { while (1) { my $r = sysread(STATUS_READ, $status_buf, 4096, length $status_buf); if (not defined $r) { next if $! == &POSIX::EINTR; last if $! == &POSIX::EAGAIN or $! == &POSIX::EWOULDBLOCK; die "$0: read STATUS_READ failed: $!"; } elsif ($r == 0) { if ($status_buf ne '' and $status_buf !~ /\n$/) { $status_buf .= "\n"; } $status_eof = 1; last; } last if $status_buf =~ /\n/; } while ($status_buf =~ /\n/) { my $status_line; ($status_line, $status_buf) = split /\n/, $status_buf, 2; handle_status $from, $to, $status_line; } } if (vec($rout, fileno(DEBCONF_COMMAND_READ), 1) == 1) { while (1) { my $r = sysread(DEBCONF_COMMAND_READ, $debconf_command_buf, 4096, length $debconf_command_buf); if (not defined $r) { next if $! == &POSIX::EINTR; last if $! == &POSIX::EAGAIN or $! == &POSIX::EWOULDBLOCK; die "$0: read DEBCONF_COMMAND_READ " . "failed: $!"; } elsif ($r == 0) { if ($debconf_command_buf ne '' and $debconf_command_buf !~ /\n$/) { $debconf_command_buf .= "\n"; } $debconf_command_eof = 1; last; } last if $debconf_command_buf =~ /\n/; } while ($debconf_command_buf =~ /\n/) { my $debconf_command_line; ($debconf_command_line, $debconf_command_buf) = split /\n/, $debconf_command_buf, 2; handle_debconf_command $debconf_command_line; } } } waitpid $pid, 0; undef $pid; my $status = $?; if ($progress) { my @ret=Debconf::Client::ConfModule::progress('SET', $to); if ($ret[0] eq '30') { cancel(); } } if ($status & 127) { return 127; } return ($status >> 8); } my $cancelled=0; my $cancel_sent_signal=0; sub cancel () { $cancelled++; if (defined $pid) { $cancel_sent_signal++; if ($cancel_sent_signal == 1) { kill INT => $pid; } else { kill KILL => $pid; } } } sub start_bar ($$) { my ($from, $to) = @_; if ($progress) { Debconf::Client::ConfModule::progress( 'START', $from, $to, 'debconf-apt-progress/title'); my @ret=Debconf::Client::ConfModule::progress( 'INFO', 'debconf-apt-progress/preparing'); if ($ret[0] eq '30') { cancel(); } } } sub stop_bar () { Debconf::Client::ConfModule::progress('STOP') if $progress; Debconf::Client::ConfModule::stop() unless $had_frontend; } if (envnonempty('DEBCONF_APT_PROGRESS_DB_REPLACE')) { $ENV{DEBCONF_DB_REPLACE} = $ENV{DEBCONF_APT_PROGRESS_DB_REPLACE}; } else { delete $ENV{DEBCONF_DB_REPLACE}; } if (envnonempty('DEBCONF_APT_PROGRESS_DB_OVERRIDE')) { $ENV{DEBCONF_DB_OVERRIDE} = $ENV{DEBCONF_APT_PROGRESS_DB_OVERRIDE}; } else { delete $ENV{DEBCONF_DB_OVERRIDE}; } $had_frontend = 1 unless $ENV{DEBCONF_APT_PROGRESS_NO_FRONTEND}; delete $ENV{DEBCONF_APT_PROGRESS_NO_FRONTEND}; # avoid inheritance my @saved_argv = @ARGV; my $result = GetOptions('config' => \$config, 'start' => \$start, 'from=i' => \$from, 'to=i' => \$to, 'stop' => \$stop, 'logfile=s' => \$logfile, 'logstderr' => \$logstderr, 'progress!' => \$progress, 'dlwaypoint=i' => \$dlwaypoint, ); if (! $progress && ($start || $from || $to || $stop)) { die "--no-progress cannot be used with --start, --from, --to, or --stop\n"; } unless ($start) { if (defined $from and not defined $to) { die "$0: --from requires --to\n"; } elsif (defined $to and not defined $from) { die "$0: --to requires --from\n"; } } my $mutex = 0; ++$mutex if $config; ++$mutex if $start; ++$mutex if $stop; if ($mutex > 1) { die "$0: must use only one of --config, --start, or --stop\n"; } if (($config or $stop) and (defined $from or defined $to)) { die "$0: cannot use --from or --to with --config or --stop\n"; } start_debconf(@saved_argv) unless $config; my $status = 0; if ($config) { print <<'EOF'; DEBCONF_APT_PROGRESS_DB_REPLACE="$DEBCONF_DB_REPLACE" DEBCONF_APT_PROGRESS_DB_OVERRIDE="$DEBCONF_DB_OVERRIDE" export DEBCONF_APT_PROGRESS_DB_REPLACE DEBCONF_APT_PROGRESS_DB_OVERRIDE DEBCONF_DB_REPLACE=configdb DEBCONF_DB_OVERRIDE='Pipe{infd:none outfd:none}' export DEBCONF_DB_REPLACE DEBCONF_DB_OVERRIDE EOF } elsif ($start) { $from = 0 unless defined $from; $to = 100 unless defined $to; start_bar($from, $to); } elsif (defined $from) { $status = run_progress($from, $to, @ARGV); } elsif ($stop) { stop_bar(); } else { start_bar(0, 100); if (! $cancelled) { $status = run_progress(0, 100, @ARGV); stop_bar(); } } if ($cancelled) { Debconf::Client::ConfModule::get("debconf/priority"); exit 30; } elsif ($status == 30) { exit 3; } else { exit $status; }
Close