| Current Path : /var/www/iplanru/data/www/intesco.ru/d59ed/ |
| Current File : /var/www/iplanru/data/www/intesco.ru/d59ed/man-db.tar |
etc/cron.weekly/man-db 0000666 00000001577 15077147566 0010700 0 ustar 00 #!/bin/sh
#
# man-db cron weekly
set -e
iosched_idle=
# Don't try to change I/O priority in a vserver or OpenVZ.
if ! egrep -q '(envID|VxID):.*[1-9]' /proc/self/status && \
([ ! -d /proc/vz ] || [ -d /proc/bc ]); then
dpkg_version="$(dpkg-query -W -f '${Version}' dpkg)"
if dpkg --compare-versions "$dpkg_version" ge 1.15.0; then
iosched_idle='--iosched idle'
fi
fi
if ! [ -d /var/cache/man ]; then
# Recover from deletion, per FHS.
mkdir -p /var/cache/man
chown man:root /var/cache/man || true
chmod 2755 /var/cache/man
fi
# regenerate man database
if [ -x /usr/bin/mandb ]; then
# --pidfile /dev/null so it always starts; mandb isn't really a daemon,
# but we want to start it like one.
start-stop-daemon --start --pidfile /dev/null \
--startas /usr/bin/mandb --oknodo --chuid man \
$iosched_idle \
-- --quiet
fi
exit 0
etc/cron.daily/man-db 0000666 00000002467 15077147746 0010501 0 ustar 00 #!/bin/sh
#
# man-db cron daily
set -e
iosched_idle=
# Don't try to change I/O priority in a vserver or OpenVZ.
if ! egrep -q '(envID|VxID):.*[1-9]' /proc/self/status && \
([ ! -d /proc/vz ] || [ -d /proc/bc ]); then
dpkg_version="$(dpkg-query -W -f '${Version}' dpkg)"
if dpkg --compare-versions "$dpkg_version" ge 1.15.0; then
iosched_idle='--iosched idle'
fi
fi
if ! [ -d /var/cache/man ]; then
# Recover from deletion, per FHS.
mkdir -p /var/cache/man
chown man:root /var/cache/man || true
chmod 2755 /var/cache/man
fi
# expunge old catman pages which have not been read in a week
if [ -d /var/cache/man ]; then
cd /
if ! dpkg-statoverride --list /var/cache/man >/dev/null 2>&1; then
chown -R man /var/cache/man || true # just in case
fi
start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \
--oknodo --chuid man $iosched_idle -- -c \
"find /var/cache/man -type f -name '*.gz' -atime +6 -print0 | \
xargs -r0 rm -f"
fi
# regenerate man database
if [ -x /usr/bin/mandb ]; then
# --pidfile /dev/null so it always starts; mandb isn't really a daemon,
# but we want to start it like one.
start-stop-daemon --start --pidfile /dev/null \
--startas /usr/bin/mandb --oknodo --chuid man \
$iosched_idle \
-- --no-purge --quiet
fi
exit 0
chconfig 0000666 00000010043 15077204714 0006260 0 ustar 00 #! /usr/bin/perl -w
# chconfig
# Copyright (C) 1999 Fabrizio Polacco <fpolacco@prosa.it>
#
# This file is part of man-db.
#
# man-db is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# man-db is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with man-db; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# tool to convert the man-db configuration file to the FHS.
# it slurps the file in argument (default /etc/manpath.config) and,
# unless exists in it a single line containing the keyword
# NOFHS
# it tries to make the changes to comply with FHS.
push @ARGV, "/etc/manpath.config" unless @ARGV;
print " Upgrading $ARGV[0]\n";
my $myum = 0;
my $myusm = 0;
my $mh = 0;
my $mhug = 0;
my $mhob = 0;
my $mhos = 0;
my $mbusm = 0;
my $mbom = 0;
push @IN, " # config file rewritten by tool chconfig\n";
while (<>) {
warn " Respecting NOFHS directive.\n" and exit 0
if m,^\s*NOFHS\s*$,i;
warn " Configuration file already processed.\n" and exit 0
if m/$IN[0]/;
push @IN, $_;
# first section
$myum = $#IN if m,^MANDATORY_MANPATH\s+/usr/man\s*$, ;
$myusm = $#IN if m,^MANDATORY_MANPATH\s+/usr/share/man\s*$, ;
# second section
$mhug = $#IN if m,^MANPATH_MAP\s+/usr/games\s+, ;
$mhob = $#IN if m,^MANPATH_MAP\s+/opt/bin\s+, ;
$mhos = $#IN if m,^MANPATH_MAP\s+/opt/sbin\s+, ;
$mh = $#IN if m,^MANPATH_MAP\s+, ;
# third section
if ( m,^MANDB_MAP\s+(/\S+)(?:\s+.*)?$, ) {
$w = $1 ;
push @IN3, ( $w =~ s,/,,g) . " $_";
$mbusm = $#IN if m,^MANDB_MAP\s+/usr/share/man(?:\s+.*)?$, ;
$mbom = $#IN if m,^MANDB_MAP\s+/opt/man(?:\s+.*)?$, ;
}
}
# In the third section, if needed, add the lines
# MANDB_MAP /usr/share/man /var/cache/man/share
# MANDB_MAP /opt/man /var/cache/man/opt
push @IN3, "3 MANDB_MAP\t/usr/share/man\t/var/cache/man/share\n" unless $mbusm;
push @IN3, "2 MANDB_MAP\t/opt/man\t/var/cache/man/opt\n" unless $mbom;
$saved = $ARGV . ".orig";
rename $ARGV, ( -e $saved ? $ARGV . "~" : $saved );
open OUT, ">$ARGV" or die "Cannot open output file $ARGV: $!\n";
foreach $j (0..$#IN) {
$_ = $IN[$j];
# first section
# MANDATORY_MANPATH section:
# we have to add
# MANDATORY_MANPATH /usr/share/man
# just after the usual line
# MANDATORY_MANPATH /usr/man
# which we leave in place.
if ( ! $myusm and $j == $myum ) {
print OUT ;
print OUT "MANDATORY_MANPATH\t\t\t/usr/share/man\n";
next;
}
# second section
# MANPATH_MAP section:
# we change all the manpath_elements from /usr/man to /usr/share/man.
# we also add the lines
# MANPATH_MAP /usr/games /usr/share/man
# MANPATH_MAP /opt/bin /opt/man
# MANPATH_MAP /opt/sbin /opt/man
# if they were missing.
if ( m,^MANPATH_MAP\s+, ) {
s,(\s+)/usr/man\s*$,$1/usr/share/man\n,;
print OUT ;
# only after the last entry of the section!
if ( $j == $mh ) {
print OUT "MANPATH_MAP\t/usr/games\t\t/usr/share/man\n"
unless $mhug;
print OUT "MANPATH_MAP\t/opt/bin\t\t/opt/man\n"
unless $mhob;
print OUT "MANPATH_MAP\t/opt/sbin\t\t/opt/man\n"
unless $mhos;
}
next;
}
# third section
# MANDB_MAP section:
# in the relative_catpath field, we change all occurrences of
# /var/catman with /var/cache/man.
# we also reorder the entries to have longer manpath before.
if ( m,^MANDB_MAP\s+, ) {
if ( @IN3 ) {
foreach (reverse sort @IN3) {
($w,$t,$m,$c) = split;
$c = "/var/cache/man/$c"
if !$c or $c =~ m/^FSSTND$/i;
$c =~ s,/var/catman,/var/cache/man,;
print OUT $t, "\t", $m, "\t\t", $c, "\n";
}
@IN3 = ();
}
next;
}
# default
print OUT;
}
__END__