/usr/share/doc/HOWTO/ja-html/KickStart-HOWTO-15.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>RedHat Linux KickStart HOWTO: ÉÕÏ¿ C - Æȼ«¤Î RPM ¤ò¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤ËÆþ¤ì¤ë</TITLE>
<LINK HREF="KickStart-HOWTO-14.html" REL=previous>
<LINK HREF="KickStart-HOWTO.html#toc15" REL=contents>
</HEAD>
<BODY>
¼¡¤Î¥Ú¡¼¥¸
<A HREF="KickStart-HOWTO-14.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="KickStart-HOWTO.html#toc15">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s15">15. ÉÕÏ¿ C - Æȼ«¤Î RPM ¤ò¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤ËÆþ¤ì¤ë</A></H2>
<P>
<P>Eric ¤µ¤ó¤¬ºîÀ®¤·¤¿¡¤ºÇ¿·¤Î RPM ¤ò RedHat ¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤ÎÎΰè
¤ËÆþ¤ì¤ë¤¿¤á¤Î¥¹¥¯¥ê¥×¥È¤ò°Ê²¼¤Ë¼¨¤·¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
#!/usr/bin/perl
#
$redhatdir="/cdrom/i386";
$rpmdir="/cdrom/i386/RedHat/RPMS/";
$updatedir="/cdrom/updates/";
@OTHERDIR=($updatedir);
foreach $dir (@OTHERDIR)
{
print "update for $dir\n";
system(" find $dir -name \"*.rpm\" -exec cp {} $rpmdir \\; ");
}
chdir($contribdir) || die "peux pas aller dans $contribdir $!\n";
system("chmod -R 755 $redhatdir");
chdir($rpmdir) || die "problem to go in $rpmdir $!\n";
#
# remove the old file
#
opendir(DIR,'.');
@package=grep(/\.rpm$/,readdir(DIR));
foreach $file (@package)
{
$file =~ /(.*)\-([\d+|\.]+\w*)\-(\d+)\.[i386|noarch].*/;
$nom=$1;
$version=$2;
$buildvers=$3;
if ($NOM{$nom})
{
$version2=$VERSION{$nom};
$buildver2=$BUILDVERS{$nom};
$file2=$FILE{$nom};
$nom2=$NOM{$nom};
if ( $version2 gt $version )
{
print "$file2 is newer than $file\n";
unlink($file);
}
else
{
if ( $version2 lt $version )
{
print "$file is newer than $file2\n";
unlink($file2);
$VERSION{$nom}=$version;
$BUILDVERS{$nom}=$buildvers;
$FILE{$nom}=$file;
$NOM{$nom}=$nom;
}
else
{
if ( $buildver2 > $buildvers )
{
print "$file2 : $buildver2 est mieux que $file : $buildvers\n";
unlink($file);
}
else
{
print "$file2 : $buildver2 is older than $file : $buildvers\n";
unlink($file2);
$VERSION{$nom}=$version;
$BUILDVERS{$nom}=$buildvers;
$FILE{$nom}=$file;
$NOM{$nom}=$nom;
}
}
}
}
else
{
$VERSION{$nom}=$version;
$BUILDVERS{$nom}=$buildvers;
$FILE{$nom}=$file;
$NOM{$nom}=$nom;
}
}
# we do the hard thing here
#
system("$redhatdir/misc/src/install/genhdlist $redhatdir");
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>
<HR>
¼¡¤Î¥Ú¡¼¥¸
<A HREF="KickStart-HOWTO-14.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="KickStart-HOWTO.html#toc15">Ìܼ¡¤Ø</A>
</BODY>
</HTML>
|