summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-February/002827.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-February/002827.html')
-rw-r--r--zarb-ml/mageia-sysadm/2011-February/002827.html4158
1 files changed, 4158 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2011-February/002827.html b/zarb-ml/mageia-sysadm/2011-February/002827.html
new file mode 100644
index 000000000..0c4b6abb0
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/2011-February/002827.html
@@ -0,0 +1,4158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-sysadm] [450] Import cleaned tools
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B450%5D%20Import%20cleaned%20tools&In-Reply-To=%3C20110206232331.3EB2E402D0%40valstar.mageia.org%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="002826.html">
+ <LINK REL="Next" HREF="002835.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-sysadm] [450] Import cleaned tools</H1>
+ <B>root at mageia.org</B>
+ <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B450%5D%20Import%20cleaned%20tools&In-Reply-To=%3C20110206232331.3EB2E402D0%40valstar.mageia.org%3E"
+ TITLE="[Mageia-sysadm] [450] Import cleaned tools">root at mageia.org
+ </A><BR>
+ <I>Mon Feb 7 00:24:11 CET 2011</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="002826.html">[Mageia-sysadm] [448] Add cleaned files
+</A></li>
+ <LI>Next message: <A HREF="002835.html">[Mageia-sysadm] [451] Import stage1
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#2827">[ date ]</a>
+ <a href="thread.html#2827">[ thread ]</a>
+ <a href="subject.html#2827">[ subject ]</a>
+ <a href="author.html#2827">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Revision: 450
+Author: dmorgan
+Date: 2011-02-07 00:23:30 +0100 (Mon, 07 Feb 2011)
+Log Message:
+-----------
+Import cleaned tools
+
+Added Paths:
+-----------
+ drakx/trunk/tools/
+ drakx/trunk/tools/.perl_checker
+ drakx/trunk/tools/Makefile
+ drakx/trunk/tools/checkusedmodules
+ drakx/trunk/tools/drakx-in-chroot
+ drakx/trunk/tools/extractchangelog
+ drakx/trunk/tools/get-needed-drakx-modules
+ drakx/trunk/tools/hd_grub.cgi
+ drakx/trunk/tools/i386/
+ drakx/trunk/tools/ia64/
+ drakx/trunk/tools/install-xml-file-list
+ drakx/trunk/tools/make_lang_png_transparent.c
+ drakx/trunk/tools/mdkinst_stage2_tool
+ drakx/trunk/tools/ntp_servers.pl
+ drakx/trunk/tools/ppc/
+ drakx/trunk/tools/rpcinfo-flushed.c
+ drakx/trunk/tools/serial_probe/
+ drakx/trunk/tools/serial_probe/Makefile
+ drakx/trunk/tools/serial_probe/device.h
+ drakx/trunk/tools/serial_probe/kudzu.h
+ drakx/trunk/tools/serial_probe/serial.c
+ drakx/trunk/tools/serial_probe/serial.h
+ drakx/trunk/tools/serial_probe/serial_probe.c
+ drakx/trunk/tools/shift_all.pl
+ drakx/trunk/tools/shift_img.c
+ drakx/trunk/tools/simplify-drakx-modules
+ drakx/trunk/tools/specific_arch
+ drakx/trunk/tools/x86_64/
+ drakx/trunk/tools/xhost+.c
+
+Added: drakx/trunk/tools/.perl_checker
+===================================================================
+--- drakx/trunk/tools/.perl_checker (rev 0)
++++ drakx/trunk/tools/.perl_checker 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,10 @@
++AutoLoader
++Carp::Heavy
++constant
++Cwd
++Digest::base
++Encode
++File::Path
++Gtk2::Gdk::Keysyms
++IO::Handle
++Pod::Usage
+\ No newline at end of file
+
+Added: drakx/trunk/tools/Makefile
+===================================================================
+--- drakx/trunk/tools/Makefile (rev 0)
++++ drakx/trunk/tools/Makefile 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,27 @@
++DIRS = serial_probe
++CFLAGS = -Wall
++
++ARCH := $(shell arch | egrep &quot;(x86_64|sparc64|s390x)&quot;)
++ifneq (&quot;x$(ARCH)&quot;, &quot;x&quot;)
++LIB_NAME = lib64
++else
++LIB_NAME = lib
++endif
++
++.PHONY: clean install $(DIRS)
++
++all: $(DIRS) xhost+ rpcinfo-flushed
++
++$(DIRS):
++ make -C $@
++
++install:
++ install -d $(ROOTDEST)/misc
++ install mdkinst_stage2_tool drakx-in-chroot $(ROOTDEST)/misc
++
++xhost+: %: %.c
++ $(CC) $(CFLAGS) $&lt; -L/usr/X11R6/$(LIB_NAME) -lX11 -o $@
++
++clean:
++ for i in $(DIRS); do $(MAKE) -C $$i clean; done
++ rm -rf *~ xhost+ rpcinfo-flushed */*.o
+
+
+Property changes on: drakx/trunk/tools/Makefile
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/checkusedmodules
+===================================================================
+--- drakx/trunk/tools/checkusedmodules (rev 0)
++++ drakx/trunk/tools/checkusedmodules 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,22 @@
++#!/bin/sh
++
++# This script compares the perl modules used by the .pm files in perl-install
++# against the ones listed in share/list, to detect potential missing modules
++# (and potential run-time problems during the stage 2)
++
++cd ../perl-install || exit 1;
++
++# list of used .pm files
++find . -name '*.pm' -not -name b_dump_strings.pm -not -path ./interactive/http.pm | \
++ xargs perl -lne '/^\s*(use|require)\s+([\w:]+)/ &amp;&amp; print $2' | sort -u &gt; /tmp/gi-used-pm
++
++# list of .pm files included in install
++perl -lne 'm{/(?:PERL_VERSION|ARCH-linux|vendor_perl/\*)/([\w/]+)\.pm$} and $_=$1, s,/,::,g, print' share/list &gt; /tmp/gi-found-pm0
++find . -name blib -prune -o -name '*.pm' | perl -ne 's,^\./,,; s/\.pm$// or next; s,/,::,g; print' &gt;&gt; /tmp/gi-found-pm0
++
++# compute difference
++sort -u /tmp/gi-found-pm0 &gt; /tmp/gi-found-pm
++diff -u /tmp/gi-{used,found}-pm | perl -lne 'BEGIN{print&quot;Unpackaged modules:&quot;} s/^-(?!-)/ / &amp;&amp; print'
++
++# cleanup
++rm -f /tmp/gi-used-pm /tmp/gi-found-pm{,0}
+
+
+Property changes on: drakx/trunk/tools/checkusedmodules
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/drakx-in-chroot
+===================================================================
+--- drakx/trunk/tools/drakx-in-chroot (rev 0)
++++ drakx/trunk/tools/drakx-in-chroot 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,228 @@
++#!/usr/bin/perl
++
++use MDK::Common;
++
++my $SLASH_LOCATION = '/tmp/drakx-in-chroot';
++
++my $verbose = 0;
++my $prefix_ROOTED = '/mnt';
++my $IMAGE_LOCATION_ROOTED = '/tmp/image';
++my $MEDIA_LOCATION_ROOTED = '/tmp/media';
++my $STAGE2_LOCATION_ROOTED = '/tmp/stage2';
++my $LOOP_MOUNT_POINT = &quot;$SLASH_LOCATION/tmp/loop&quot;;
++my $LIVE_LOCATION_REL = 'install/stage2/live/';
++my $COMPRESSED_LOCATION_REL = 'install/stage2/';
++my $COMPRESSED_FILE_REL = $COMPRESSED_LOCATION_REL . 'mdkinst.sqfs';
++my $AUTO_INSTALL_ROOTED = '/tmp/auto_inst.cfg.pl';
++my $DEFCFG_ROOTED = '/tmp/defcfg.pl';
++my $RPMSRATE_ROOTED = '/tmp/rpmsrate';
++my $resolution = '800x600';
++my ($disk_iso_repository, $repository_uri);
++
+<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">+ at ARGV</A> &gt;= 2 or die &quot;usage: drakx-in-chroot &lt;root of distrib&gt; &lt;dir to install to&gt; [options]\n
++\nOptions specific to drakx-in-chroot:
++ --flang XX use XX locale
++ --disk-iso path of a distro
++ --resolution=XXXxYYYY (eg: --resolution=1024x768)\n
++ --repository=&lt;path&gt; path of packages repository
++ --text text mode installer
++&quot;;
++
++(my $repository, my $dir, @ARGV) = @ARGV;
++foreach (@ARGV) {
++ if (/--resolution=(.*)/) {
++ $resolution = $1;
++ } elsif (/--disk-iso=(.*)/) {
++ $disk_iso_repository = $1;
++ } elsif (/--repository=(.*)/) {
++ $repository_uri = $1;
++ }
++}
++my ($repository_without_arch, $repository_arch) = basename($repository) eq arch() ? (dirname($repository), '/' . arch()) : ($repository, '');
++my $STAGE2_LOCATION = $SLASH_LOCATION . $STAGE2_LOCATION_ROOTED;
++
++my $sudo;
++if ($&gt;) {
++ $sudo = &quot;sudo&quot;;
++ $ENV{PATH} = &quot;/sbin:/usr/sbin:$ENV{PATH}&quot;;
++}
++
++undef $ENV{TMPDIR}; # prevent packdrake faillure on creating temporary files
++
++if (-d $SLASH_LOCATION) {
++ umount_all() == 0 or exit(1);
++ sys(&quot;$sudo rm -rf $SLASH_LOCATION/var/lib/rpm $SLASH_LOCATION/dev/mapper&quot;);
++ rm_rf($SLASH_LOCATION);
++}
++
++mkdir_p(&quot;$SLASH_LOCATION$_&quot;) foreach '/dev', '/dev/usb', '/etc', '/var', '/proc', '/sys', $STAGE2_LOCATION_ROOTED, $MEDIA_LOCATION_ROOTED, $prefix_ROOTED;
++
++sys(&quot;$sudo rm -rf $dir&quot;) if $ENV{CLEAN};
++-e $dir or sys(&quot;$sudo mkdir -p $dir&quot;);
++
++copy_auto_install_files();
++
++my $remote_repository = $repository =~ m!^(ftp|http)://! &amp;&amp; $1;
++if ($remote_repository) {
++ my $local_mdkinst = &quot;$SLASH_LOCATION/tmp/mdkinst.sqfs&quot;;
++ sys(&quot;curl --silent -o $local_mdkinst $repository/$COMPRESSED_FILE_REL&quot;);
++ mount_mdkinst($local_mdkinst);
++} elsif (-d &quot;$repository/$LIVE_LOCATION_REL&quot;) {
++ sys(&quot;$sudo mount -o bind $repository/$LIVE_LOCATION_REL $STAGE2_LOCATION&quot;);
++} elsif (-e &quot;$repository/$COMPRESSED_FILE_REL&quot;) {
++ mount_mdkinst(&quot;$repository/$COMPRESSED_FILE_REL&quot;);
++}
++
++sys(&quot;$sudo mount -o bind $dir $SLASH_LOCATION$prefix_ROOTED&quot;);
++$repository_uri ||= $repository_without_arch if !$remote_repository;
++sys(&quot;$sudo mount -o bind $repository_uri $SLASH_LOCATION$MEDIA_LOCATION_ROOTED&quot;) if $repository_uri;
++
++sys(&quot;$sudo mount -t proc none $SLASH_LOCATION/proc&quot;);
++sys(&quot;$sudo mount -t sysfs none $SLASH_LOCATION/sys&quot;);
++
++if ($disk_iso_repository) {
++ my $repository_arch = $repository_arch || 'i586';
++ mkdir_p($LOOP_MOUNT_POINT);
++ sys(&quot;$sudo mount -o loop,ro $disk_iso_repository $LOOP_MOUNT_POINT&quot;);
++ symlinkf('loop/' . $repository_arch, &quot;$SLASH_LOCATION$IMAGE_LOCATION_ROOTED&quot;); # FIXME: arch()
++}
++
++symlinkf('media' . $repository_arch, &quot;$SLASH_LOCATION$IMAGE_LOCATION_ROOTED&quot;);
++create_initial_symlinks();
++create_initial_devices();
++
++apply_stage2_updates();
++
++output(&quot;$SLASH_LOCATION/etc/hosts&quot;, &quot;127.0.0.1 localhost\n&quot;) if ! -e &quot;$SLASH_LOCATION/etc/hosts&quot;;
++
++#- in the chroot, we have no way to know which device corresponds to the &quot;/&quot; partition.
++#- so helping it by giving the device which provide major/minor information
++mkdir_p(&quot;$dir/dev&quot;);
++eval { cp_af($_, &quot;$dir$_&quot;) } foreach qw(/dev/root);
++
++#- if the DISPLAY is remote, we may need to resolve the name:
++eval { cp_af($_, &quot;$SLASH_LOCATION$_&quot;) } foreach qw(/etc/resolv.conf);
++
++{
++ chomp(my $kernel_version = `uname -r`);
++ my $dir = &quot;/modules/$kernel_version&quot;;
++ mkdir_p(&quot;$SLASH_LOCATION$dir&quot;);
++ output_p(&quot;$SLASH_LOCATION$dir&quot; . $_, &quot;\n&quot;) foreach &quot;/lib/$dir/modules.dep&quot;, &quot;/lib/$dir/modules.alias&quot;;
++}
++
++my $Xnest_pid;
++my $Xnest_bin = find { whereis_binary($_) } 'Xephyr', 'Xnest';
++if (!-f ($SLASH_LOCATION . $AUTO_INSTALL_ROOTED) &amp;&amp; $Xnest_bin &amp;&amp; (join('', @ARGV) !~ /--text/)) {
++ my $DISPLAY = ':8';
++ $Xnest_pid = fork();
++ if (!$Xnest_pid) {
++ exec $Xnest_bin, $DISPLAY, '-ac', ($Xnest_bin eq 'Xephyr' ? '-screen' : '-geometry'), $resolution or die &quot;Xnest failed\n&quot;;
++ }
++ $ENV{DISPLAY} = '127.0.0.1' . $DISPLAY;
++}
++
++if (my $pid = fork()) {
++ waitpid $pid, 0;
++ umount_all() == 0 or warn &quot;umounting failed\n&quot;;
++ $Xnest_pid and kill 15, $Xnest_pid;
++} else {
++ $ENV{TERM} = 'linux'; # we only have terminfo for terminal &quot;linux&quot;
++ $ENV{HOME} = '/';
++ # to kept sync with gi/mdk-stage1/init.c::env:
++ $ENV{LD_LIBRARY_PATH}='/lib:/usr/lib:/mnt/lib:/mnt/usr/lib:/usr/X11R6/lib:/mnt/usr/X11R6/lib:/lib64:/usr/lib64:/usr/X11R6/lib64:/mnt/lib64:/mnt/usr/lib64:/mnt/usr/X11R6/lib64';
++ if ($remote_repository) {
++ $ENV{URLPREFIX} = $repository;
++ }
++ my $cmd = join(' ', &quot;/usr/bin/runinstall2 --local_install&quot;,
++ if_($disk_iso_repository, &quot;--method disk-iso&quot;),
++ if_($remote_repository, &quot;--method $remote_repository&quot;),
++ @ARGV);
++ exec &quot;$sudo chroot $SLASH_LOCATION $cmd&quot; or die &quot;exec $cmd in $SLASH_LOCATION failed\n&quot;;
++}
++
++sub system_verbose { warn join(' ', @_), &quot;\n&quot; if $verbose; system(@_) }
++sub sys { &amp;system_verbose; $? and die qq(running &quot;@_&quot; failed: $?\n) }
++
++sub mount_mdkinst {
++ my ($mdkinst) = @_;
++ sys(&quot;$sudo mount -t squashfs -o loop,ro $mdkinst $STAGE2_LOCATION&quot;);
++}
++sub create_initial_symlinks() {
++ foreach (cat_or_die(&quot;$STAGE2_LOCATION/usr/share/symlinks&quot;)) {
++ my ($from, $to_) = split;
++ my $to = $SLASH_LOCATION . ($to_ || $from);
++ $from = &quot;$STAGE2_LOCATION_ROOTED$from&quot; if !$to_;
++ if (! -l $to) {
++ symlink $from, $to or die &quot;symlinking $to failed\n&quot;;
++ }
++ }
++}
++
++sub create_initial_devices() {
++ sys(&quot;$sudo cp -a /dev/{mem,null,random,urandom} $SLASH_LOCATION/dev&quot;);
++}
++
++sub umount_all() {
++ my $err;
++ clean_stage2_updates();
++ my @procs = ('/proc/bus/usb', '/proc', '/sys');
++ foreach ((map { &quot;$prefix_ROOTED$_&quot; } @procs, ''), @procs, $STAGE2_LOCATION_ROOTED, $LOOP_MOUNT_POINT, $MEDIA_LOCATION_ROOTED, $IMAGE_LOCATION_ROOTED) {
++ my $dir = &quot;$SLASH_LOCATION$_&quot;;
++ rmdir $dir;
++ if (-d $dir) {
++ if (m!/proc/bus/usb! || begins_with($_, $prefix_ROOTED)) {
++ system_verbose &quot;$sudo umount $dir 2&gt;/dev/null&quot;;
++ next;
++ }
++ system_verbose &quot;$sudo umount $dir&quot;;
++ }
++ rmdir $dir;
++ if (-d $dir) {
++ warn &quot;$dir is busy\n&quot;;
++ $err++;
++ }
++ }
++ if (my @remaining = cat_('/proc/mounts') =~ m!($SLASH_LOCATION/mnt/\S+)!g) {
++ warn &quot;umount those mount points first: &quot;, join(' ', @remaining), &quot;\n&quot;;
++ $err++;
++ }
++ $err;
++}
++
++sub copy_auto_install_files() {
++ my ($opt);
++ each_index {
++ if ($opt eq 'auto_install' &amp;&amp; -f $_) {
++ cp_f($_, $SLASH_LOCATION . $AUTO_INSTALL_ROOTED);
++ $_ = $AUTO_INSTALL_ROOTED;
++ } elsif ($opt eq 'defcfg' &amp;&amp; -f $_) {
++ cp_f($_, $SLASH_LOCATION . $DEFCFG_ROOTED);
++ $_ = $DEFCFG_ROOTED;
++ } elsif ($opt eq 'rpmsrate' &amp;&amp; -f $_) {
++ cp_f($_, $SLASH_LOCATION . $RPMSRATE_ROOTED);
++ }
++ undef $opt;
++ /^--?(.*)/ and $opt = $1;
++ } @ARGV;
++}
++
++my @stage2_updates;
++sub apply_stage2_updates() {
++ each_index {
++ if ($_ eq '--stage2-update') {
++ my $file = $ARGV[$::i+1];
++ my $dest = $ARGV[$::i+2];
++ if (-f $file &amp;&amp; $dest) {
++ undef $_;
++ undef $ARGV[$::i+1];
++ undef $ARGV[$::i+2];
++ push @stage2_updates, $dest;
++ sys(&quot;$sudo mount --bind $file $STAGE2_LOCATION/$dest&quot;);
++ }
++ }
++ } @ARGV;
++}
++
++sub clean_stage2_updates() {
++ sys(&quot;$sudo umount $STAGE2_LOCATION/$_&quot;) foreach @stage2_updates;
++}
+
+
+Property changes on: drakx/trunk/tools/drakx-in-chroot
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/extractchangelog
+===================================================================
+--- drakx/trunk/tools/extractchangelog (rev 0)
++++ drakx/trunk/tools/extractchangelog 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,2 @@
++#!/usr/bin/perl
++
+
+Added: drakx/trunk/tools/get-needed-drakx-modules
+===================================================================
+--- drakx/trunk/tools/get-needed-drakx-modules (rev 0)
++++ drakx/trunk/tools/get-needed-drakx-modules 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,19 @@
++#!/usr/bin/perl
++
++use MDK::Common;
++
++my ($rel, $dest, $script) = @ARGV;
++
++$rel =~ s!/?$!!;
++
++foreach (`strace -efile perl -cw -I $rel $script 2&gt;&amp;1`) {
++ my ($f) = /^open\(&quot;(.*?)&quot;,.*\)\s*=\s*\d+$/ or next;
++ $f !~ m!/usr/lib/perl5/[^/]*/warnings.pm! or next;
++ if (begins_with($f, $rel)) {
++ print $f, &quot;\t&quot;, $dest . substr($f, length($rel)), &quot;\n&quot;;
++ } elsif (begins_with($f, '/dev/')) {
++ # skip
++ } elsif (begins_with($f, '/')) {
++ print &quot;$f\n&quot;;
++ }
++}
+
+
+Property changes on: drakx/trunk/tools/get-needed-drakx-modules
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/hd_grub.cgi
+===================================================================
+--- drakx/trunk/tools/hd_grub.cgi (rev 0)
++++ drakx/trunk/tools/hd_grub.cgi 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,102 @@
++#!/usr/bin/perl
++
++use CGI ':all';
++use CGI::Carp;
++
++my $default_append = &quot;ramdisk_size=128000 root=/dev/ram3&quot;;
++my $default_acpi = &quot;acpi=ht&quot;;
++my $default_vga = &quot;vga=788&quot;;
++
++my $cgi_name = &quot;/&quot; . ($0 =~ m|([^/]+)$|)[0];
++
++print
++ header(),
++ start_html(-TITLE =&gt; 'hd_grub configuration');
++
++if (param()) {
++ print_menu_lst();
++} else {
++ print_form();
++}
++
++print end_html;
++
++
++sub menu_lst {
++ my ($hd, $hd_linux, $partition_number, $directory) = @_;
++
++ my $grub_partition_number = $partition_number - 1;
++
++ &lt;&lt;EOF;
++timeout 0
++default 0
++
++title Mageia Install
++
++root ($hd,$grub_partition_number)
++kernel $directory/isolinux/alt0/vmlinuz $default_append $default_acpi $default_vga automatic=method:disk,partition:$hd_linux$partition_number,directory:$directory
++initrd $directory/isolinux/alt0/all.rdz
++EOF
++
++}
++
++sub print_menu_lst {
++ my $directory = param('directory');
++ $directory =~ s!^/!!;
++ print
++ ol(li(qq(Select the text below and save it in a file &quot;menu.lst&quot;)),
++ li(qq(Create a floppy from $directory/images/hd_grub.img (eg: &lt;tt&gt;dd if=hd_grub.img of=/dev/fd0&lt;/tt&gt;))),
++ li(qq(Copy the file &quot;menu.lst&quot; to the floppy, overwriting the existing one)),
++ ),
++ p(),
++ start_form(-name =&gt; 'form', -action =&gt; $cgi_name, -method =&gt; 'get'),
++ textarea(-default =&gt; menu_lst(param('hd'), param('hd_linux'), param('partition_number'), &quot;/$directory&quot;),
++ -rows =&gt; 15, -columns =&gt; 120,
++ ),
++ end_form(),
++}
++
++sub print_form {
++ print
++ p(),
++ start_form(-name =&gt; 'form', -action =&gt; $cgi_name, -method =&gt; 'get'),
++ ul(&quot;Please choose the partition where %s is copied.&quot;,
++ li(popup_menu(-name =&gt; &quot;hd&quot;, -default =&gt; 'hd0',
++ -values =&gt; [ 'hd0' .. 'hd3' ],
++ -labels =&gt; { hd0 =&gt; '1st BIOS hard drive (usually hda or sda)',
++ hd1 =&gt; '2nd BIOS hard drive',
++ hd2 =&gt; '3rd BIOS hard drive',
++ hd3 =&gt; '4th BIOS hard drive',
++ })),
++ li(popup_menu(-name =&gt; &quot;hd_linux&quot;, -default =&gt; 'hda',
++ -values =&gt; [ 'hda' .. 'hdd', 'sda' .. 'sdc', 'hde' .. 'hdh' ],
++ -labels =&gt; {
++ hda =&gt; '1st IDE hard drive (hda)',
++ hdb =&gt; '2nd IDE hard drive (hdb)',
++ hdc =&gt; '3rd IDE hard drive (hdc)',
++ hdd =&gt; '4th IDE hard drive (hdd)',
++ hde =&gt; '5th IDE hard drive (hde)',
++ hdf =&gt; '6th IDE hard drive (hdf)',
++ hdg =&gt; '7th IDE hard drive (hdg)',
++ hdh =&gt; '8th IDE hard drive (hdh)',
++ sda =&gt; '1st SCSI hard drive (sda)',
++ sdb =&gt; '2nd SCSI hard drive (sdb)',
++ sdc =&gt; '3rd SCSI hard drive (sdc)',
++ })),
++ li(popup_menu(-name =&gt; &quot;partition_number&quot;, -default =&gt; '0',
++ -values =&gt; [ 1 .. 15 ],
++ -labels =&gt; { 1 =&gt; '1st primary partition (hda1, sda1 or ...)',
++ 2 =&gt; '2nd primary partition',
++ 3 =&gt; '3rd primary partition',
++ 4 =&gt; '4th primary partition',
++ 5 =&gt; '5th partition (hda5, sda5 or ...) (first logical partition)',
++ map { $_ =&gt; $_ . 'th partition' } 6 .. 15
++ })),
++ ),
++ p(),
++ ul(&quot;Please enter the directory containing the %s Distribution (relative to the partition chosen above)&quot;,
++ li(textfield(-name =&gt; 'directory', -default =&gt; '/cooker/i586', size =&gt; 40)),
++ ),
++ p(submit(-name =&gt; 'Go')),
++ end_form();
++}
+
+
+Property changes on: drakx/trunk/tools/hd_grub.cgi
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/install-xml-file-list
+===================================================================
+--- drakx/trunk/tools/install-xml-file-list (rev 0)
++++ drakx/trunk/tools/install-xml-file-list 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,383 @@
++#!/usr/bin/perl
++
++use FileHandle;
++use MDK::Common;
++use XML::Parser;
++use Data::Dumper;
++use File::Glob;
++use Config;
++use Cwd 'cwd';
++
++my $want_sudo = $ARGV[0] eq '--sudo' &amp;&amp; shift @ARGV;
++
+<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">+ at ARGV</A> == 2 or die &quot;usage: install-xml-file-list [--sudo] &lt;xml file&gt; &lt;destination&gt;\n&quot;;
++my ($xml_file_list, $DEST) = @ARGV;
++
++my $sudo = '';
++if ($&gt;) {
++ $sudo = &quot;sudo&quot; if $want_sudo;
++ $ENV{PATH} = &quot;/sbin:/usr/sbin:$ENV{PATH}&quot;;
++}
++
++#$verbose = 1;
++
++my $initial_dir = cwd();
++my $ARCH = arch() =~ /i.86/ ? 'i386' : arch();
++my $LIB = arch() =~ /x86_64/ ? &quot;lib64&quot; : &quot;lib&quot;;
++
++my $base_cpio_options = '-pumd --quiet';
++
++my $problem;
++my $tree = XML::Parser-&gt;new(Style =&gt; 'Tree')-&gt;parsefile($xml_file_list);
++
++my $main_node = decompose($tree);
++
++$main_node-&gt;{tag} eq 'list' or die &quot;bad file $xml_file_list (main tag should be &lt;list&gt;)\n&quot;;
++
++handle_nodes({}, $main_node);
++
++$problem and exit 1;
++
++install_needed_libraries();
++
++final_cleanup();
++
++sub error {
++ my ($err) = @_;
++ warn &quot;FATAL: $err\n&quot;;
++ $problem = 1;
++}
++
++sub final_cleanup() {
++ #- cpio creates directory 700, that's not nice
++ system(&quot;find $DEST -type d -print0 | xargs -0 $sudo chmod 755&quot;);
++}
++
++sub handle_nodes {
++ my ($env, $e) = @_;
++ handle_node($env, decompose($_)) foreach @{$e-&gt;{l}};
++}
++sub handle_node {
++ my ($env, $node) = @_;
++
++ if (!$node-&gt;{tag} &amp;&amp; $node-&gt;{text} !~ /\S/) {
++ } elsif (!$node-&gt;{tag}) {
++ install($env, $node-&gt;{text});
++ } elsif ($node-&gt;{tag} eq 'if') {
++ my $cond = valid_cond($node-&gt;{attr});
++ handle_nodes($env, $node) if $cond;
++ } elsif ($node-&gt;{tag} eq 'if-not') {
++ my $cond = valid_cond($node-&gt;{attr});
++ handle_nodes($env, $node) if !$cond;
++ } elsif (member($node-&gt;{tag}, 'from', 'to', 'mode', 'filter')) {
++ handle_nodes(add_to_env($env, $node-&gt;{tag} =&gt; $node-&gt;{attr}), $node);
++ } else {
++ warn &quot;expecting tag &lt;from&gt;, not &lt;$node-&gt;{tag}&gt;\n&quot;;
++ }
++}
++
++sub valid_cond {
++ my ($attr) = @_;
++ every {
++ if ($_ eq 'ARCH') {
++ $ARCH =~ /$attr-&gt;{$_}/;
++ } elsif ($_ eq 'set') {
++ $ENV{$attr-&gt;{$_}};
++ } else {
++ die &quot;&lt;if&gt;: unknown condition $_\n&quot;;
++ }
++ } keys %$attr;
++}
++
++sub add_to_env {
++ my ($env, $tag, $attr) = @_;
++ my %env = map_each { $::a =&gt; +{%$::b} } %$env;
++ foreach (keys %$attr) {
++ !$env{$tag}{$_} or die qq(overriding attribute &lt;$tag $_=&quot;$env{$tag}{$_}&quot;&gt; with $_=&quot;$attr-&gt;{$_}&quot;\n);
++ $env{$tag}{$_} = $attr-&gt;{$_};
++ }
++ \%env;
++}
++
++sub group_by_n {
++ my ($n, $l) = @_;
++ my (@r, $subl);
++ my $i = 0;
++ foreach (@$l) {
++ if ($i % $n == 0) {
++ push @r, $subl = [];
++ }
++ push @$subl, $_;
++ $i++;
++ }
++ @r;
++}
++
++sub identify_file {
++ my ($dev, $ino) = @_;
++ &quot;$dev:$ino&quot;;
++}
++
++sub all_files_rec_ {
++ my ($d) = @_;
++
++ $d, -d $d &amp;&amp; ! -l $d ? map { all_files_rec_(&quot;$d/$_&quot;) } all($d) : ();
++}
++
++sub expand_macros {
++ my ($f) = @_;
++ $f =~ s!\bLIB\b!$LIB!g;
++ $f =~ s!\bARCH\b!$ARCH!ge;
++ $f =~ s!\$\((\w+)\)!$ENV{$1} || die &quot;$1 undefined\n&quot;!ge;
++ $f;
++}
++
++my %needed_libraries;
++sub collect_needed_libraries {
++ my (@to_check) = @_;
++ while (@to_check) {
++ my $to_check = join(' ', @to_check);
++ my @l = `ldd $to_check 2&gt;/dev/null` =~ m! =&gt; (/\S+)!g;
++ foreach (@l) {
++ if ($main_node-&gt;{attr}{'no-arch-libraries'}) {
++ #- replace /lib/tls or /lib/i686 with /lib
++ s!^(/lib(64)?/).*?/!$1! if arch() !~ /x86_64/;
++ }
++ }
++ @to_check = grep { !$needed_libraries{$_}++ } @l;
++ @to_check = ();
++ }
++}
++sub install_needed_libraries {
++ copy_files('', $DEST, [ keys %needed_libraries ], '', '--dereference');
++}
++
++sub collect_needed_perl_files {
++ my ($local_rep, $dest, @scripts) = @_;
++
++ my (%local, %global);
++ foreach my $script (@scripts) {
++ foreach (`strace -efile perl -cw -I$local_rep $script 2&gt;&amp;1`) {
++ my ($f) = /^open\(&quot;(.*?)&quot;,.*\)\s*=\s*\d+$/ or next;
++ if ($f =~ m!^\Q$local_rep\E/(.*)!) {
++ $local{$1} = 1;
++ } elsif (begins_with($f, '/dev/')) {
++ # skip
++ } elsif (begins_with($f, '/')) {
++ if ($main_node-&gt;{attr}{'no-arch-libraries'}) {
++ #- replace /lib/tls or /lib/i686 with /lib
++ $f =~ s!^(/lib(64)?/).*?/!$1! if arch() !~ /x86_64/;
++ }
++ $global{$f} = 1;
++ }
++ }
++ }
++ [ keys %local ], [ keys %global ];
++}
++
++sub copy_files {
++ my ($working_dir, $to_dir, $files, $b_flatten, @options) = @_;
++
++ if ($b_flatten) {
++ mkdir_p($to_dir);
++ my $options = join(' ', '-r', @options);
++ foreach (group_by_n(20, $files)) {
++ warn &quot;cp $options to_dir $to_dir from $working_dir: @$_\n&quot; if $verbose;
++ system(&quot;cd $working_dir ; $sudo cp $options @$_ $to_dir&quot;);
++ }
++ } else {
++ my $options = join(' ', $base_cpio_options, @options);
++ warn &quot;cpio $options to_dir=$to_dir from=$working_dir: @$files\n&quot; if $verbose;
++ open(my $F, &quot;| cd $working_dir ; $sudo cpio $options $to_dir&quot;);
++ print $F &quot;$_\n&quot; foreach @$files;
++ close($F) or die &quot;cpio $to_dir failed\n&quot;;
++ }
++}
++
++sub install {
++ my ($env, $text) = @_;
++
++ my $from_dir = expand_macros($env-&gt;{from}{dir});
++ my $to_dir = $DEST . expand_macros($env-&gt;{to}{dir} || $env-&gt;{to}{flatten} &amp;&amp; $from_dir || '');
++ my $copy_mode = $env-&gt;{mode}{copy} || '';
++ my $working_dir = '.';
++
++ my $expand = $env-&gt;{from}{expand} || '';
++
++ my $disallow_from_dir = sub {
++ !$from_dir or die &quot;from dir not allowed with $expand binary\n&quot;;
++ };
++
++ my $from_file = sub {
++ my ($rel, $b_full_glob, $b_recursive_dirs) = @_;
++ my $f = expand_macros($from_dir ? &quot;$from_dir/$rel&quot; : $rel);
++ my @l = $f;
++ chdir $working_dir;
++ if ($f =~ /\*/ || $b_full_glob) {
++ @l = File::Glob::bsd_glob($f); #- using bsd_glob because CORE::glob() splits on whitespace and we don't want this
++ if (@l == 0) {
++ error(&quot;no match for $f&quot;);
++ } elsif (@l == 1 || $b_full_glob) {
++ } else {
++ error(&quot;multiple match for $f&quot;);
++ @l = ();
++ }
++ } elsif (! -e $f) {
++ error(&quot;missing file $f ($rel) in $working_dir&quot;);
++ @l = ();
++ }
++ if (@l == 1 &amp;&amp; -d $l[0] &amp;&amp; $b_recursive_dirs) {
++ @l = all_files_rec_($l[0]);
++ }
++ @l = grep { !m!/(\.svn|CVS)($|/)! } @l;
++ if (my $re = $env-&gt;{from}{matching}) {
++ @l = grep { eval $re } @l;
++ }
++
++ collect_needed_libraries(grep { -f $_ &amp;&amp; -x $_ } @l);
++
++ chdir $initial_dir;
++ @l;
++ };
++
++ my @text_l = $env-&gt;{from}{spaces_in_filename} ? $text =~ /^\s*(.*?)\s*$/ : split(' ', $text);
++ my @files;
++ if ($expand eq 'tar') {
++ foreach (@text_l) {
++ my ($tarball) = $from_file-&gt;($_) or next;
++ system('tar', 'xfj', $tarball, '-C', $to_dir);
++ }
++ # not filling @files, things are already done
++
++ } elsif ($expand eq 'command') {
++ @files = chomp_(`$text`);
++
++ } elsif ($expand eq 'glob') {
++ #- glob done in $from_file
++ @files = @text_l;
++
++ } elsif ($expand eq 'binary') {
++ $disallow_from_dir-&gt;();
++ my @PATH = qw(/sbin /bin /usr/bin /usr/sbin /usr/X11R6/bin);
++ foreach my $name (map { expand_macros($_) } @text_l) {
++ my @l = grep { -x $_ } map { &quot;$_/$name&quot; } @PATH;
++ @l or error(&quot;can't find binary $name&quot;), next;
++ if (@l &gt; 1) {
++ my @m = grep { ! -l $_ } @l;
++ if (@m == 1) {
++ my $id = identify_file($m[0]);
++ push @files, grep { -l $_ &amp;&amp; identify_file($_) eq $id } @l;
++ }
++ @l = @m if @m;
++ }
++ if (@l &gt; 1) {
++ warn &quot;many matches for binary $name: &quot; . join(' ', @l) . &quot;, choosing $l[0]\n&quot;;
++ }
++ my $f = $l[0];
++ while (1) {
++ push @files, $f;
++ $copy_mode ne 'dereference' or last;
++ my $l = readlink($f) or last;
++ if ($l =~ m!/! &amp;&amp; $l !~ m!^\.\..*/s?bin/[^/]+$!) {
++ warn &quot;keeping symlink $f -&gt; $l as is\n&quot;;
++ last;
++ }
++ $f = dirname($f) . '/' . $l;
++ }
++ }
++ $copy_mode ||= 'keep-links';
++ $env-&gt;{filter}{command} ||= 'strip';
++
++ } elsif ($expand eq 'rpm') {
++ $disallow_from_dir-&gt;();
++ foreach my $rpm (@text_l) {
++ my @l = chomp_(`rpm -ql $rpm`) or error(&quot;rpm $rpm must be installed&quot;);
++ push @files, @l;
++ }
++
++ } elsif ($expand eq 'perl') {
++ $disallow_from_dir-&gt;();
++ $from_dir = '/usr/lib/perl5/vendor_perl/*';
++ @files = @text_l;
++ } elsif ($expand eq 'main-perl') {
++ $disallow_from_dir-&gt;();
++ $from_dir = $Config{privlib};
++ @files = @text_l;
++ } elsif ($expand =~ /collect-perl-files/) {
++ my (undef, $local, $to) = split(' ', $expand);
++
++ @files = @text_l;
++ warn &quot;collect-perl-files $local $to @files ($env-&gt;{filter}{command})\n&quot;;
++ my ($local_perl_files, $global_perl_files) = collect_needed_perl_files($local, $to, @files);
++ warn &quot;collect-perl-files gave: &quot;, join(' ', @$local_perl_files), &quot;\n&quot;;
++# warn &quot; and: &quot;, join(' ', @$global_perl_files), &quot;\n&quot;;
++ copy_and_filter($local =~ m!/! ? $local : &quot;$working_dir/$local&quot;, &quot;$DEST$to&quot;, $local_perl_files, $env-&gt;{filter}, '', '--dereference');
++ copy_and_filter('', $DEST, $global_perl_files, $env-&gt;{filter}, '', '--dereference');
++
++ } elsif ($expand) {
++ die &quot;unknown expand method $expand\n&quot;;
++ } else {
++ @files = @text_l;
++
++ $env-&gt;{filter}{command} ||= 'strip' if $to_dir =~ m!/bin$!;
++ }
++
++ if ($env-&gt;{to}{dir} &amp;&amp; $from_dir) {
++ $working_dir = $from_dir;
++ undef $from_dir;
++ }
++
++ my @all_files = map { $from_file-&gt;($_, $expand eq 'glob', $expand ne 'rpm') } @files;
++
++ my @options = (
++ if_($copy_mode ne 'keep-links', '--dereference'),
++ );
++ if (@all_files) {
++ copy_and_filter($working_dir, $to_dir, \@all_files, $env-&gt;{filter}, $env-&gt;{to}{flatten}, @options);
++ }
++}
++
++sub copy_and_filter {
++ my ($working_dir, $to_dir, $all_files, $filter, $flatten, @copy_options) = @_;
++
++ copy_files($working_dir, $to_dir, $all_files, $flatten, @copy_options);
++ apply_filter($to_dir, $filter, $all_files, $flatten);
++}
++
++sub apply_filter {
++ my ($to_dir, $filter, $all_files, $b_flatten) = @_;
++
++ chdir $to_dir;
++ foreach (group_by_n(20, $all_files)) {
++ my @l = $b_flatten ? (map { basename($_) } @$_) : (map { &quot;./$_&quot; } @$_);
++ @l = grep { ! -d $_ } @l or next;
++
++ if (my $subst = $filter-&gt;{subst}) {
++ system('perl', '-pi', '-e', $subst, @l);
++ }
++ if (my $command = $filter-&gt;{command}) {
++ $command = $initial_dir . &quot;/$command&quot; if $command =~ m!^..?/!;
++ if ($command =~ /simplify-drakx-modules/) {
++ @l = grep { !/\.so($|\.)/ } @l or next;
++ }
++ my @options = (
++ if_($command eq 'gzip', '-9f'),
++ if_($command eq 'strip', '2&gt;/dev/null'),
++ );
++ warn &quot;running $command @options @l\n&quot; if $verbose;
++ system(join(' ', $command, @options, @l));
++ }
++ }
++ chdir $initial_dir;
++}
++
++sub decompose {
++ my ($tree) = @_;
++ my ($tag, $val) = @$tree;
++ if ($tag eq '0') {
++ { text =&gt; $val };
++ } else {
++ my ($attr, @l) = @$val;
++ { tag =&gt; $tag, attr =&gt; $attr, l =&gt; [ group_by2(@l) ] };
++ }
++}
+
+
+Property changes on: drakx/trunk/tools/install-xml-file-list
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/make_lang_png_transparent.c
+===================================================================
+--- drakx/trunk/tools/make_lang_png_transparent.c (rev 0)
++++ drakx/trunk/tools/make_lang_png_transparent.c 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,167 @@
++/*
++ * Guillaume Cottenceau (gc at mandriva.com)
++ *
++ * Copyright 2002-2005 Mandriva
++ *
++ * This software may be freely redistributed under the terms of the GNU
++ * public license.
++ *
++ */
++
++#include &lt;unistd.h&gt;
++#include &lt;stdio.h&gt;
++#include &lt;string.h&gt;
++#include &lt;stdarg.h&gt;
++
++#define PNG_DEBUG 3
++#include &lt;png.h&gt;
++
++void abort_(const char * s, ...)
++{
++ va_list args;
++ va_start(args, s);
++ vfprintf(stderr, s, args);
++ fprintf(stderr, &quot;\n&quot;);
++ va_end(args);
++ abort();
++}
++
++int x, y;
++
++int width, height;
++png_byte color_type;
++png_byte bit_depth;
++
++png_structp png_ptr;
++png_infop info_ptr;
++int number_of_passes;
++png_bytep * row_pointers;
++
++void read_png_file(char* file_name)
++{
++ char header[8]; // 8 is the maximum size that can be checked
++
++ /* open file and test for it being a png */
++ FILE *fp = fopen(file_name, &quot;rb&quot;);
++ if (!fp)
++ abort_(&quot;[read_png_file] File %s could not be opened for reading&quot;, file_name);
++ fread(header, 1, 8, fp);
++ if (png_sig_cmp(header, 0, 8))
++ abort_(&quot;[read_png_file] File %s is not recognized as a PNG file&quot;, file_name);
++
++
++ /* initialize stuff */
++ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
++
++ if (!png_ptr)
++ abort_(&quot;[read_png_file] png_create_read_struct failed&quot;);
++
++ info_ptr = png_create_info_struct(png_ptr);
++ if (!info_ptr)
++ abort_(&quot;[read_png_file] png_create_info_struct failed&quot;);
++
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[read_png_file] Error during init_io&quot;);
++
++ png_init_io(png_ptr, fp);
++ png_set_sig_bytes(png_ptr, 8);
++
++ png_read_info(png_ptr, info_ptr);
++
++ width = info_ptr-&gt;width;
++ height = info_ptr-&gt;height;
++ color_type = info_ptr-&gt;color_type;
++ bit_depth = info_ptr-&gt;bit_depth;
++
++ number_of_passes = png_set_interlace_handling(png_ptr);
++ png_read_update_info(png_ptr, info_ptr);
++
++
++ /* read file */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[read_png_file] Error during read_image&quot;);
++
++ row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height);
++ for (y=0; y&lt;height; y++)
++ row_pointers[y] = (png_byte*) malloc(info_ptr-&gt;rowbytes);
++
++ png_read_image(png_ptr, row_pointers);
++}
++
++
++void write_png_file(char* file_name)
++{
++ /* create file */
++ FILE *fp = fopen(file_name, &quot;wb&quot;);
++ if (!fp)
++ abort_(&quot;[write_png_file] File %s could not be opened for writing&quot;, file_name);
++
++
++ /* initialize stuff */
++ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
++
++ if (!png_ptr)
++ abort_(&quot;[write_png_file] png_create_write_struct failed&quot;);
++
++ info_ptr = png_create_info_struct(png_ptr);
++ if (!info_ptr)
++ abort_(&quot;[write_png_file] png_create_info_struct failed&quot;);
++
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during init_io&quot;);
++
++ png_init_io(png_ptr, fp);
++
++
++ /* write header */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during writing header&quot;);
++
++ png_set_IHDR(png_ptr, info_ptr, width, height,
++ bit_depth, color_type, PNG_INTERLACE_NONE,
++ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
++
++ png_write_info(png_ptr, info_ptr);
++
++
++ /* write bytes */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during writing bytes&quot;);
++
++ png_write_image(png_ptr, row_pointers);
++
++
++ /* end write */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during end of write&quot;);
++
++ png_write_end(png_ptr, NULL);
++
++}
++
++void process_file(void)
++{
++ if (info_ptr-&gt;color_type != PNG_COLOR_TYPE_RGBA)
++ abort_(&quot;[process_file] color_type of input file must be PNG_COLOR_TYPE_RGBA (is %d)&quot;, info_ptr-&gt;color_type);
++
++ for (y=0; y&lt;height; y++) {
++ png_byte* row = row_pointers[y];
++ for (x=0; x&lt;width; x++) {
++ png_byte* ptr = &amp;(row[x*4]);
++ ptr[3] = 255-ptr[0];
++ ptr[0] = ptr[1] = ptr[2] = 0;
++ }
++ }
++
++}
++
++
++int main(int argc, char **argv)
++{
++ if (argc != 3)
++ abort_(&quot;Usage: program_name &lt;file_in&gt; &lt;file_out&gt;&quot;);
++
++ read_png_file(argv[1]);
++ process_file();
++ write_png_file(argv[2]);
++}
+
+
+Property changes on: drakx/trunk/tools/make_lang_png_transparent.c
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/mdkinst_stage2_tool
+===================================================================
+--- drakx/trunk/tools/mdkinst_stage2_tool (rev 0)
++++ drakx/trunk/tools/mdkinst_stage2_tool 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,66 @@
++#!/bin/sh
++
++error() {
++ cat &lt;&lt;EOF;
++usage: mdkinst_stage2_tool [--clean] [--compress | --uncompress] &lt;stage2 dir&gt; [&lt;compressed file&gt;]
++EOF
++ exit 1
++}
++
++if [ &quot;$1&quot; = &quot;--clean&quot; ]; then
++ CLEAN=1
++ shift
++fi
++
++[ $# = 2 -o $# = 3 ] || error
++
++if [ &quot;$1&quot; = &quot;--compress&quot; -o &quot;$1&quot; == &quot;--uncompress&quot; ]; then
++ ACTION=$1
++ shift
++ STAGE2_DIR=&quot;$1&quot;
++ shift
++ LIVE_DIR=&quot;$STAGE2_DIR/live&quot;
++ if [ -n &quot;$1&quot; ]; then
++ COMPRESSED_IMAGE=$1
++ shift
++ else
++ COMPRESSED_IMAGE=&quot;$STAGE2_DIR/mdkinst.sqfs&quot;
++ fi
++else
++ error
++fi
++
++if [ $ACTION = &quot;--compress&quot; ]; then
++ which mksquashfs &gt;/dev/null 2&gt;/dev/null || { echo &quot;missing command mksquashfs (from squashfs-tools)&quot;; exit 1; }
++
++ [ -d &quot;$LIVE_DIR&quot; ] || error
++ echo &quot;Creating $COMPRESSED_IMAGE from $LIVE_DIR&quot;
++ rm -f $STAGE2_DIR/.room
++ mksquashfs $LIVE_DIR $COMPRESSED_IMAGE -all-root -noappend &gt;/dev/null || { echo &quot;mksquashfs failed&quot;; exit 1; }
++ chmod 755 $COMPRESSED_IMAGE
++ echo foo &gt; $STAGE2_DIR/.room
++ if [ -s $STAGE2_DIR/.room ]; then
++ rm -f $STAGE2_DIR/.room
++ [ -n &quot;$CLEAN&quot; ] &amp;&amp; rm -rf $LIVE_DIR
++ else
++ echo &quot;not enough space&quot;
++ rm -f $COMPRESSED_IMAGE
++ exit 1
++ fi
++else
++ which unsquashfs &gt;/dev/null 2&gt;/dev/null || { echo &quot;missing command unsquashfs (from squashfs-tools)&quot;; exit 1; }
++
++ [ -f &quot;$COMPRESSED_IMAGE&quot; ] || error
++ echo &quot;Creating $LIVE_DIR from $COMPRESSED_IMAGE&quot;
++
++ if [ $EUID != &quot;0&quot; ]; then
++ SUDO=&quot;sudo&quot;
++ PATH=&quot;/sbin:/usr/sbin:$PATH&quot;
++ fi
++
++ unsquashfs -dest $LIVE_DIR $COMPRESSED_IMAGE || { rm -rf $LIVE_DIR; exit 1; }
++
++ [ -n &quot;$CLEAN&quot; ] &amp;&amp; rm -f $COMPRESSED_IMAGE
++fi
++
++exit 0
+
+
+Property changes on: drakx/trunk/tools/mdkinst_stage2_tool
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/ntp_servers.pl
+===================================================================
+--- drakx/trunk/tools/ntp_servers.pl (rev 0)
++++ drakx/trunk/tools/ntp_servers.pl 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,303 @@
++#!/usr/bin/perl
++
++#open F, &quot;/usr/bin/lynx -dump <A HREF="http://www.eecis.udel.edu/~mills/ntp/clock1a.html|">http://www.eecis.udel.edu/~mills/ntp/clock1a.html|</A>&quot;;
++open(my $G, &quot;/usr/bin/lynx -dump <A HREF="http://www.eecis.udel.edu/~mills/ntp/clock2a.html|">http://www.eecis.udel.edu/~mills/ntp/clock2a.html|</A>&quot;);
++
++# Chris Kloiber &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">ckloiber at redhat.com</A>&gt; writes:
++# &gt; It's not considered polite to use the Stratum 1 servers for purposes that
++# &gt; are not absolutely critical. I would use Stratum 2 servers and live with
++# &gt; the few nanoseconds difference.
++#parse() while &lt;F&gt;;
++
++parse($_) while &lt;$G&gt;;
++
++my @all;
++my ($l, $nb);
++sub parse {
++ local ($_) = @_;
++ /Active Servers/ .. /Discontinued Service/ or return;
++ if (/^\s+\d+\. ([A-Z ]*[A-Z]);?\s+([.\w-]+)/) {
++ push @all, $l = { name =&gt; $2, indic =&gt; $1 };
++ $nb = 0;
++ } else {
++ s/^\s*//;
++ s/\s*$//;
++ my ($field, $val) = /^(.*):\s*(.*)/;
++ if ($field =~ /policy/i) {
++ $field = &quot;policy&quot;;
++ $val = lc join(' ', split(' ', $val));
++ $val =~ s/glad to receive a note//;
++ $val =~ s/(but )?please send (a )?message to notify//;
++ $val =~ s/an email note is appreciated//;
++ $val =~ s/please send a message with the//;
++ $val =~ s/no need to notify//;
++ $val =~ s/[(), .;]*$//;
++ $val = &quot;open access&quot; if $val eq &quot;public&quot;;
++ warn &quot;$val ($all[-1]{name})\n&quot; if $val ne 'open access';
++ } elsif ($field =~ /^Contact|Synchroni[sz]ation|Location|Geographic\s+Coordinates|Service\s+Area|Note$/i) {
++ } else {
++# warn &quot;bad line ($field) $_\n&quot;;
++ return;
++ }
++ $l-&gt;{$field} .= ($l-&gt;{$field} &amp;&amp; ' ') . $val;
++ }
++ $nb++;
++}
++
++
++use Data::Dumper;
++#warn Dumper(\@all);
++
++foreach (grep { $_-&gt;{policy} eq 'open access' } @all) {
++ my ($country, $state) = split ' ', $_-&gt;{indic};
++ $country = ucfirst(lc $country_codes{$country});
++ $country .= &quot; $state&quot; if $state;
++ printf &quot;\t'%s' =&gt; '%s',\n&quot;, lc($_-&gt;{name}), $country;
++}
++
++BEGIN {
++%country_codes = ( # from <A HREF="ftp://ftp.ripe.net/iso3166-countrycodes">ftp://ftp.ripe.net/iso3166-countrycodes</A>
++&quot;AF&quot;, &quot;AFGHANISTAN&quot;,
++&quot;AL&quot;, &quot;ALBANIA&quot;,
++&quot;DZ&quot;, &quot;ALGERIA&quot;,
++&quot;AS&quot;, &quot;AMERICAN SAMOA&quot;,
++&quot;AD&quot;, &quot;ANDORRA&quot;,
++&quot;AO&quot;, &quot;ANGOLA&quot;,
++&quot;AI&quot;, &quot;ANGUILLA&quot;,
++&quot;AQ&quot;, &quot;ANTARCTICA&quot;,
++&quot;AG&quot;, &quot;ANTIGUA AND BARBUDA&quot;,
++&quot;AR&quot;, &quot;ARGENTINA&quot;,
++&quot;AM&quot;, &quot;ARMENIA&quot;,
++&quot;AW&quot;, &quot;ARUBA&quot;,
++&quot;AU&quot;, &quot;AUSTRALIA&quot;,
++&quot;AT&quot;, &quot;AUSTRIA&quot;,
++&quot;AZ&quot;, &quot;AZERBAIJAN&quot;,
++&quot;BS&quot;, &quot;BAHAMAS&quot;,
++&quot;BH&quot;, &quot;BAHRAIN&quot;,
++&quot;BD&quot;, &quot;BANGLADESH&quot;,
++&quot;BB&quot;, &quot;BARBADOS&quot;,
++&quot;BY&quot;, &quot;BELARUS&quot;,
++&quot;BE&quot;, &quot;BELGIUM&quot;,
++&quot;BZ&quot;, &quot;BELIZE&quot;,
++&quot;BJ&quot;, &quot;BENIN&quot;,
++&quot;BM&quot;, &quot;BERMUDA&quot;,
++&quot;BT&quot;, &quot;BHUTAN&quot;,
++&quot;BO&quot;, &quot;BOLIVIA&quot;,
++&quot;BA&quot;, &quot;BOSNIA AND HERZEGOWINA&quot;,
++&quot;BW&quot;, &quot;BOTSWANA&quot;,
++&quot;BV&quot;, &quot;BOUVET ISLAND&quot;,
++&quot;BR&quot;, &quot;BRAZIL&quot;,
++&quot;IO&quot;, &quot;BRITISH INDIAN OCEAN TERRITORY&quot;,
++&quot;BN&quot;, &quot;BRUNEI DARUSSALAM&quot;,
++&quot;BG&quot;, &quot;BULGARIA&quot;,
++&quot;BF&quot;, &quot;BURKINA FASO&quot;,
++&quot;BI&quot;, &quot;BURUNDI&quot;,
++&quot;KH&quot;, &quot;CAMBODIA&quot;,
++&quot;CM&quot;, &quot;CAMEROON&quot;,
++&quot;CA&quot;, &quot;CANADA&quot;,
++&quot;CV&quot;, &quot;CAPE VERDE&quot;,
++&quot;KY&quot;, &quot;CAYMAN ISLANDS&quot;,
++&quot;CF&quot;, &quot;CENTRAL AFRICAN REPUBLIC&quot;,
++&quot;TD&quot;, &quot;CHAD&quot;,
++&quot;CL&quot;, &quot;CHILE&quot;,
++&quot;CN&quot;, &quot;CHINA&quot;,
++&quot;CX&quot;, &quot;CHRISTMAS ISLAND&quot;,
++&quot;CC&quot;, &quot;COCOS (KEELING) ISLANDS&quot;,
++&quot;CO&quot;, &quot;COLOMBIA&quot;,
++&quot;KM&quot;, &quot;COMOROS&quot;,
++&quot;CG&quot;, &quot;CONGO&quot;,
++&quot;CD&quot;, &quot;CONGO, THE DEMOCRATIC REPUBLIC OF THE&quot;,
++&quot;CK&quot;, &quot;COOK ISLANDS&quot;,
++&quot;CR&quot;, &quot;COSTA RICA&quot;,
++&quot;CI&quot;, &quot;COTE D'IVOIRE&quot;,
++&quot;HR&quot;, &quot;CROATIA&quot;,
++&quot;CU&quot;, &quot;CUBA&quot;,
++&quot;CY&quot;, &quot;CYPRUS&quot;,
++&quot;CZ&quot;, &quot;CZECH REPUBLIC&quot;,
++&quot;DK&quot;, &quot;DENMARK&quot;,
++&quot;DJ&quot;, &quot;DJIBOUTI&quot;,
++&quot;DM&quot;, &quot;DOMINICA&quot;,
++&quot;DO&quot;, &quot;DOMINICAN REPUBLIC&quot;,
++&quot;TP&quot;, &quot;EAST TIMOR&quot;,
++&quot;EC&quot;, &quot;ECUADOR&quot;,
++&quot;EG&quot;, &quot;EGYPT&quot;,
++&quot;SV&quot;, &quot;EL SALVADOR&quot;,
++&quot;GQ&quot;, &quot;EQUATORIAL GUINEA&quot;,
++&quot;ER&quot;, &quot;ERITREA&quot;,
++&quot;EE&quot;, &quot;ESTONIA&quot;,
++&quot;ET&quot;, &quot;ETHIOPIA&quot;,
++&quot;FK&quot;, &quot;FALKLAND ISLANDS (MALVINAS)&quot;,
++&quot;FO&quot;, &quot;FAROE ISLANDS&quot;,
++&quot;FJ&quot;, &quot;FIJI&quot;,
++&quot;FI&quot;, &quot;FINLAND&quot;,
++&quot;FR&quot;, &quot;FRANCE&quot;,
++&quot;FX&quot;, &quot;FRANCE, METROPOLITAN&quot;,
++&quot;GF&quot;, &quot;FRENCH GUIANA&quot;,
++&quot;PF&quot;, &quot;FRENCH POLYNESIA&quot;,
++&quot;TF&quot;, &quot;FRENCH SOUTHERN TERRITORIES&quot;,
++&quot;GA&quot;, &quot;GABON&quot;,
++&quot;GM&quot;, &quot;GAMBIA&quot;,
++&quot;GE&quot;, &quot;GEORGIA&quot;,
++&quot;DE&quot;, &quot;GERMANY&quot;,
++&quot;GH&quot;, &quot;GHANA&quot;,
++&quot;GI&quot;, &quot;GIBRALTAR&quot;,
++&quot;GR&quot;, &quot;GREECE&quot;,
++&quot;GL&quot;, &quot;GREENLAND&quot;,
++&quot;GD&quot;, &quot;GRENADA&quot;,
++&quot;GP&quot;, &quot;GUADELOUPE&quot;,
++&quot;GU&quot;, &quot;GUAM&quot;,
++&quot;GT&quot;, &quot;GUATEMALA&quot;,
++&quot;GN&quot;, &quot;GUINEA&quot;,
++&quot;GW&quot;, &quot;GUINEA-BISSAU&quot;,
++&quot;GY&quot;, &quot;GUYANA&quot;,
++&quot;HT&quot;, &quot;HAITI&quot;,
++&quot;HM&quot;, &quot;HEARD AND MC DONALD ISLANDS&quot;,
++&quot;VA&quot;, &quot;HOLY SEE (VATICAN CITY STATE)&quot;,
++&quot;HN&quot;, &quot;HONDURAS&quot;,
++&quot;HK&quot;, &quot;HONG KONG&quot;,
++&quot;HU&quot;, &quot;HUNGARY&quot;,
++&quot;IS&quot;, &quot;ICELAND&quot;,
++&quot;IN&quot;, &quot;INDIA&quot;,
++&quot;ID&quot;, &quot;INDONESIA&quot;,
++&quot;IR&quot;, &quot;IRAN (ISLAMIC REPUBLIC OF)&quot;,
++&quot;IQ&quot;, &quot;IRAQ&quot;,
++&quot;IE&quot;, &quot;IRELAND&quot;,
++&quot;IL&quot;, &quot;ISRAEL&quot;,
++&quot;IT&quot;, &quot;ITALY&quot;,
++&quot;JM&quot;, &quot;JAMAICA&quot;,
++&quot;JP&quot;, &quot;JAPAN&quot;,
++&quot;JO&quot;, &quot;JORDAN&quot;,
++&quot;KZ&quot;, &quot;KAZAKHSTAN&quot;,
++&quot;KE&quot;, &quot;KENYA&quot;,
++&quot;KI&quot;, &quot;KIRIBATI&quot;,
++&quot;KP&quot;, &quot;KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF&quot;,
++&quot;KR&quot;, &quot;KOREA, REPUBLIC OF&quot;,
++&quot;KW&quot;, &quot;KUWAIT&quot;,
++&quot;KG&quot;, &quot;KYRGYZSTAN&quot;,
++&quot;LA&quot;, &quot;LAO PEOPLE'S DEMOCRATIC REPUBLIC&quot;,
++&quot;LV&quot;, &quot;LATVIA&quot;,
++&quot;LB&quot;, &quot;LEBANON&quot;,
++&quot;LS&quot;, &quot;LESOTHO&quot;,
++&quot;LR&quot;, &quot;LIBERIA&quot;,
++&quot;LY&quot;, &quot;LIBYAN ARAB JAMAHIRIYA&quot;,
++&quot;LI&quot;, &quot;LIECHTENSTEIN&quot;,
++&quot;LT&quot;, &quot;LITHUANIA&quot;,
++&quot;LU&quot;, &quot;LUXEMBOURG&quot;,
++&quot;MO&quot;, &quot;MACAU&quot;,
++&quot;MK&quot;, &quot;MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF&quot;,
++&quot;MG&quot;, &quot;MADAGASCAR&quot;,
++&quot;MW&quot;, &quot;MALAWI&quot;,
++&quot;MY&quot;, &quot;MALAYSIA&quot;,
++&quot;MV&quot;, &quot;MALDIVES&quot;,
++&quot;ML&quot;, &quot;MALI&quot;,
++&quot;MT&quot;, &quot;MALTA&quot;,
++&quot;MH&quot;, &quot;MARSHALL ISLANDS&quot;,
++&quot;MQ&quot;, &quot;MARTINIQUE&quot;,
++&quot;MR&quot;, &quot;MAURITANIA&quot;,
++&quot;MU&quot;, &quot;MAURITIUS&quot;,
++&quot;YT&quot;, &quot;MAYOTTE&quot;,
++&quot;MX&quot;, &quot;MEXICO&quot;,
++&quot;FM&quot;, &quot;MICRONESIA, FEDERATED STATES OF&quot;,
++&quot;MD&quot;, &quot;MOLDOVA, REPUBLIC OF&quot;,
++&quot;MC&quot;, &quot;MONACO&quot;,
++&quot;MN&quot;, &quot;MONGOLIA&quot;,
++&quot;MS&quot;, &quot;MONTSERRAT&quot;,
++&quot;MA&quot;, &quot;MOROCCO&quot;,
++&quot;MZ&quot;, &quot;MOZAMBIQUE&quot;,
++&quot;MM&quot;, &quot;MYANMAR&quot;,
++&quot;NA&quot;, &quot;NAMIBIA&quot;,
++&quot;NR&quot;, &quot;NAURU&quot;,
++&quot;NP&quot;, &quot;NEPAL&quot;,
++&quot;NL&quot;, &quot;NETHERLANDS&quot;,
++&quot;AN&quot;, &quot;NETHERLANDS ANTILLES&quot;,
++&quot;NC&quot;, &quot;NEW CALEDONIA&quot;,
++&quot;NZ&quot;, &quot;NEW ZEALAND&quot;,
++&quot;NI&quot;, &quot;NICARAGUA&quot;,
++&quot;NE&quot;, &quot;NIGER&quot;,
++&quot;NG&quot;, &quot;NIGERIA&quot;,
++&quot;NU&quot;, &quot;NIUE&quot;,
++&quot;NF&quot;, &quot;NORFOLK ISLAND&quot;,
++&quot;MP&quot;, &quot;NORTHERN MARIANA ISLANDS&quot;,
++&quot;NO&quot;, &quot;NORWAY&quot;,
++&quot;OM&quot;, &quot;OMAN&quot;,
++&quot;PK&quot;, &quot;PAKISTAN&quot;,
++&quot;PW&quot;, &quot;PALAU&quot;,
++&quot;PA&quot;, &quot;PANAMA&quot;,
++&quot;PG&quot;, &quot;PAPUA NEW GUINEA&quot;,
++&quot;PY&quot;, &quot;PARAGUAY&quot;,
++&quot;PE&quot;, &quot;PERU&quot;,
++&quot;PH&quot;, &quot;PHILIPPINES&quot;,
++&quot;PN&quot;, &quot;PITCAIRN&quot;,
++&quot;PL&quot;, &quot;POLAND&quot;,
++&quot;PT&quot;, &quot;PORTUGAL&quot;,
++&quot;PR&quot;, &quot;PUERTO RICO&quot;,
++&quot;QA&quot;, &quot;QATAR&quot;,
++&quot;RE&quot;, &quot;REUNION&quot;,
++&quot;RO&quot;, &quot;ROMANIA&quot;,
++&quot;RU&quot;, &quot;RUSSIA&quot;,
++&quot;RW&quot;, &quot;RWANDA&quot;,
++&quot;KN&quot;, &quot;SAINT KITTS AND NEVIS&quot;,
++&quot;LC&quot;, &quot;SAINT LUCIA&quot;,
++&quot;VC&quot;, &quot;SAINT VINCENT AND THE GRENADINES&quot;,
++&quot;WS&quot;, &quot;SAMOA&quot;,
++&quot;SM&quot;, &quot;SAN MARINO&quot;,
++&quot;ST&quot;, &quot;SAO TOME AND PRINCIPE&quot;,
++&quot;SA&quot;, &quot;SAUDI ARABIA&quot;,
++&quot;SN&quot;, &quot;SENEGAL&quot;,
++&quot;SC&quot;, &quot;SEYCHELLES&quot;,
++&quot;SL&quot;, &quot;SIERRA LEONE&quot;,
++&quot;SG&quot;, &quot;SINGAPORE&quot;,
++&quot;SK&quot;, &quot;SLOVAKIA (Slovak Republic)&quot;,
++&quot;SI&quot;, &quot;SLOVENIA&quot;,
++&quot;SB&quot;, &quot;SOLOMON ISLANDS&quot;,
++&quot;SO&quot;, &quot;SOMALIA&quot;,
++&quot;ZA&quot;, &quot;SOUTH AFRICA&quot;,
++&quot;GS&quot;, &quot;SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS&quot;,
++&quot;ES&quot;, &quot;SPAIN&quot;,
++&quot;LK&quot;, &quot;SRI LANKA&quot;,
++&quot;SH&quot;, &quot;ST. HELENA&quot;,
++&quot;PM&quot;, &quot;ST. PIERRE AND MIQUELON&quot;,
++&quot;SD&quot;, &quot;SUDAN&quot;,
++&quot;SR&quot;, &quot;SURINAME&quot;,
++&quot;SJ&quot;, &quot;SVALBARD AND JAN MAYEN ISLANDS&quot;,
++&quot;SZ&quot;, &quot;SWAZILAND&quot;,
++&quot;SE&quot;, &quot;SWEDEN&quot;,
++&quot;CH&quot;, &quot;SWITZERLAND&quot;,
++&quot;SY&quot;, &quot;SYRIAN ARAB REPUBLIC&quot;,
++&quot;TW&quot;, &quot;TAIWAN, PROVINCE OF CHINA&quot;,
++&quot;TJ&quot;, &quot;TAJIKISTAN&quot;,
++&quot;TZ&quot;, &quot;TANZANIA, UNITED REPUBLIC OF&quot;,
++&quot;TH&quot;, &quot;THAILAND&quot;,
++&quot;TG&quot;, &quot;TOGO&quot;,
++&quot;TK&quot;, &quot;TOKELAU&quot;,
++&quot;TO&quot;, &quot;TONGA&quot;,
++&quot;TT&quot;, &quot;TRINIDAD AND TOBAGO&quot;,
++&quot;TN&quot;, &quot;TUNISIA&quot;,
++&quot;TR&quot;, &quot;TURKEY&quot;,
++&quot;TM&quot;, &quot;TURKMENISTAN&quot;,
++&quot;TC&quot;, &quot;TURKS AND CAICOS ISLANDS&quot;,
++&quot;TV&quot;, &quot;TUVALU&quot;,
++&quot;UG&quot;, &quot;UGANDA&quot;,
++&quot;UA&quot;, &quot;UKRAINE&quot;,
++&quot;AE&quot;, &quot;UNITED ARAB EMIRATES&quot;,
++&quot;GB&quot;, &quot;UNITED KINGDOM&quot;,
++&quot;US&quot;, &quot;UNITED STATES&quot;,
++&quot;UM&quot;, &quot;UNITED STATES MINOR OUTLYING ISLANDS&quot;,
++&quot;UY&quot;, &quot;URUGUAY&quot;,
++&quot;UZ&quot;, &quot;UZBEKISTAN&quot;,
++&quot;VU&quot;, &quot;VANUATU&quot;,
++&quot;VE&quot;, &quot;VENEZUELA&quot;,
++&quot;VN&quot;, &quot;VIET NAM&quot;,
++&quot;VG&quot;, &quot;VIRGIN ISLANDS (BRITISH)&quot;,
++&quot;VI&quot;, &quot;VIRGIN ISLANDS (U.S.)&quot;,
++&quot;WF&quot;, &quot;WALLIS AND FUTUNA ISLANDS&quot;,
++&quot;EH&quot;, &quot;WESTERN SAHARA&quot;,
++&quot;YE&quot;, &quot;YEMEN&quot;,
++&quot;YU&quot;, &quot;YUGOSLAVIA&quot;,
++&quot;ZM&quot;, &quot;ZAMBIA&quot;,
++&quot;ZW&quot;, &quot;ZIMBABWE&quot;,
++
++#added
++&quot;UK&quot;, &quot;UNITED KINGDOM&quot;,
++);
++}
+
+Added: drakx/trunk/tools/rpcinfo-flushed.c
+===================================================================
+--- drakx/trunk/tools/rpcinfo-flushed.c (rev 0)
++++ drakx/trunk/tools/rpcinfo-flushed.c 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,740 @@
++#define _(x) x
++
++/* @(#)rpcinfo.c 2.2 88/08/11 4.0 RPCSRC */
++#if !defined(lint) &amp;&amp; defined (SCCSID)
++static char sccsid[] = &quot;@(#)rpcinfo.c 1.22 87/08/12 SMI&quot;;
++#endif
++
++/*
++ * Copyright (C) 1986, Sun Microsystems, Inc.
++ */
++
++/*
++ * rpcinfo: ping a particular rpc program
++ * or dump the portmapper
++ */
++
++/*
++ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
++ * unrestricted use provided that this legend is included on all tape
++ * media and as a part of the software program in whole or part. Users
++ * may copy or modify Sun RPC without charge, but are not authorized
++ * to license or distribute it to anyone else except as part of a product or
++ * program developed by the user.
++ *
++ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
++ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
++ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
++ *
++ * Sun RPC is provided with no support and without any obligation on the
++ * part of Sun Microsystems, Inc. to assist in its use, correction,
++ * modification or enhancement.
++ *
++ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
++ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
++ * OR ANY PART THEREOF.
++ *
++ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
++ * or profits or other special, indirect and consequential damages, even if
++ * Sun has been advised of the possibility of such damages.
++ *
++ * Sun Microsystems, Inc.
++ * 2550 Garcia Avenue
++ * Mountain View, California 94043
++ */
++
++#include &lt;getopt.h&gt;
++#include &lt;string.h&gt;
++#include &lt;unistd.h&gt;
++#include &lt;rpc/rpc.h&gt;
++#include &lt;stdio.h&gt;
++#include &lt;sys/socket.h&gt;
++#include &lt;netinet/in.h&gt;
++#include &lt;arpa/inet.h&gt;
++#include &lt;netdb.h&gt;
++#include &lt;rpc/pmap_prot.h&gt;
++#include &lt;rpc/pmap_clnt.h&gt;
++#include &lt;signal.h&gt;
++#include &lt;ctype.h&gt;
++#include &lt;locale.h&gt;
++#include &lt;libintl.h&gt;
++
++#define MAXHOSTLEN 256
++
++#define MIN_VERS ((u_long) 0)
++#define MAX_VERS ((u_long) 4294967295UL)
++
++static void udpping (u_short portflag, int argc, char **argv);
++static void tcpping (u_short portflag, int argc, char **argv);
++static int pstatus (CLIENT *client, u_long prognum, u_long vers);
++static void pmapdump (int argc, char **argv);
++static bool_t reply_proc (void *res, struct sockaddr_in *who);
++static void brdcst (int argc, char **argv) __attribute__ ((noreturn));
++static void deletereg (int argc, char **argv);
++static void usage (void);
++static u_long getprognum (char *arg);
++static u_long getvers (char *arg);
++static void get_inet_address (struct sockaddr_in *addr, char *host);
++
++/*
++ * Functions to be performed.
++ */
++#define NONE 0 /* no function */
++#define PMAPDUMP 1 /* dump portmapper registrations */
++#define TCPPING 2 /* ping TCP service */
++#define UDPPING 3 /* ping UDP service */
++#define BRDCST 4 /* ping broadcast UDP service */
++#define DELETES 5 /* delete registration for the service */
++
++int
++main (int argc, char **argv)
++{
++ register int c;
++ int errflg;
++ int function;
++ u_short portnum;
++
++ setlocale (LC_ALL, &quot;&quot;);
++
++ function = NONE;
++ portnum = 0;
++ errflg = 0;
++ while ((c = getopt (argc, argv, &quot;ptubdn:&quot;)) != -1)
++ {
++ switch (c)
++ {
++
++ case 'p':
++ if (function != NONE)
++ errflg = 1;
++ else
++ function = PMAPDUMP;
++ break;
++
++ case 't':
++ if (function != NONE)
++ errflg = 1;
++ else
++ function = TCPPING;
++ break;
++
++ case 'u':
++ if (function != NONE)
++ errflg = 1;
++ else
++ function = UDPPING;
++ break;
++
++ case 'b':
++ if (function != NONE)
++ errflg = 1;
++ else
++ function = BRDCST;
++ break;
++
++ case 'n':
++ portnum = (u_short) atoi (optarg); /* hope we don't get bogus # */
++ break;
++
++ case 'd':
++ if (function != NONE)
++ errflg = 1;
++ else
++ function = DELETES;
++ break;
++
++ case '?':
++ errflg = 1;
++ }
++ }
++
++ if (errflg || function == NONE)
++ {
++ usage ();
++ return 1;
++ }
++
++ switch (function)
++ {
++
++ case PMAPDUMP:
++ if (portnum != 0)
++ {
++ usage ();
++ return 1;
++ }
++ pmapdump (argc - optind, argv + optind);
++ break;
++
++ case UDPPING:
++ udpping (portnum, argc - optind, argv + optind);
++ break;
++
++ case TCPPING:
++ tcpping (portnum, argc - optind, argv + optind);
++ break;
++
++ case BRDCST:
++ if (portnum != 0)
++ {
++ usage ();
++ return 1;
++ }
++ brdcst (argc - optind, argv + optind);
++ break;
++
++ case DELETES:
++ deletereg (argc - optind, argv + optind);
++ break;
++ }
++
++ return 0;
++}
++
++static void
++udpping (portnum, argc, argv)
++ u_short portnum;
++ int argc;
++ char **argv;
++{
++ struct timeval to;
++ struct sockaddr_in addr;
++ enum clnt_stat rpc_stat;
++ CLIENT *client;
++ u_long prognum, vers, minvers, maxvers;
++ int sock = RPC_ANYSOCK;
++ struct rpc_err rpcerr;
++ int failure;
++
++ if (argc &lt; 2 || argc &gt; 3)
++ {
++ usage ();
++ exit (1);
++ }
++ prognum = getprognum (argv[1]);
++ get_inet_address (&amp;addr, argv[0]);
++ /* Open the socket here so it will survive calls to clnt_destroy */
++ sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
++ if (sock &lt; 0)
++ {
++ perror (&quot;rpcinfo: socket&quot;);
++ exit (1);
++ }
++ failure = 0;
++ if (argc == 2)
++ {
++ /*
++ * A call to version 0 should fail with a program/version
++ * mismatch, and give us the range of versions supported.
++ */
++ addr.sin_port = htons (portnum);
++ to.tv_sec = 5;
++ to.tv_usec = 0;
++ if ((client = clntudp_create (&amp;addr, prognum, (u_long) 0,
++ to, &amp;sock)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu is not available\n&quot;), prognum);
++ exit (1);
++ }
++ to.tv_sec = 10;
++ to.tv_usec = 0;
++ rpc_stat = clnt_call (client, NULLPROC, (xdrproc_t) xdr_void,
++ (char *) NULL, (xdrproc_t) xdr_void,
++ (char *) NULL, to);
++ if (rpc_stat == RPC_PROGVERSMISMATCH)
++ {
++ clnt_geterr (client, &amp;rpcerr);
++ minvers = rpcerr.re_vers.low;
++ maxvers = rpcerr.re_vers.high;
++ }
++ else if (rpc_stat == RPC_SUCCESS)
++ {
++ /*
++ * Oh dear, it DOES support version 0.
++ * Let's try version MAX_VERS.
++ */
++ addr.sin_port = htons (portnum);
++ to.tv_sec = 5;
++ to.tv_usec = 0;
++ if ((client = clntudp_create (&amp;addr, prognum, MAX_VERS,
++ to, &amp;sock)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu version %lu is not available\n&quot;),
++ prognum, MAX_VERS);
++ exit (1);
++ }
++ to.tv_sec = 10;
++ to.tv_usec = 0;
++ rpc_stat = clnt_call (client, NULLPROC, (xdrproc_t) xdr_void,
++ NULL, (xdrproc_t) xdr_void, NULL, to);
++ if (rpc_stat == RPC_PROGVERSMISMATCH)
++ {
++ clnt_geterr (client, &amp;rpcerr);
++ minvers = rpcerr.re_vers.low;
++ maxvers = rpcerr.re_vers.high;
++ }
++ else if (rpc_stat == RPC_SUCCESS)
++ {
++ /*
++ * It also supports version MAX_VERS.
++ * Looks like we have a wise guy.
++ * OK, we give them information on all
++ * 4 billion versions they support...
++ */
++ minvers = 0;
++ maxvers = MAX_VERS;
++ }
++ else
++ {
++ (void) pstatus (client, prognum, MAX_VERS);
++ exit (1);
++ }
++ }
++ else
++ {
++ (void) pstatus (client, prognum, (u_long) 0);
++ exit (1);
++ }
++ clnt_destroy (client);
++ for (vers = minvers; vers &lt;= maxvers; vers++)
++ {
++ addr.sin_port = htons (portnum);
++ to.tv_sec = 5;
++ to.tv_usec = 0;
++ if ((client = clntudp_create (&amp;addr, prognum, vers,
++ to, &amp;sock)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu version %lu is not available\n&quot;),
++ prognum, vers);
++ exit (1);
++ }
++ to.tv_sec = 10;
++ to.tv_usec = 0;
++ rpc_stat = clnt_call (client, NULLPROC, (xdrproc_t) xdr_void,
++ NULL, (xdrproc_t) xdr_void, NULL, to);
++ if (pstatus (client, prognum, vers) &lt; 0)
++ failure = 1;
++ clnt_destroy (client);
++ }
++ }
++ else
++ {
++ vers = getvers (argv[2]);
++ addr.sin_port = htons (portnum);
++ to.tv_sec = 5;
++ to.tv_usec = 0;
++ if ((client = clntudp_create (&amp;addr, prognum, vers,
++ to, &amp;sock)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu version %lu is not available\n&quot;),
++ prognum, vers);
++ exit (1);
++ }
++ to.tv_sec = 10;
++ to.tv_usec = 0;
++ rpc_stat = clnt_call (client, 0, (xdrproc_t) xdr_void, NULL,
++ (xdrproc_t) xdr_void, NULL, to);
++ if (pstatus (client, prognum, vers) &lt; 0)
++ failure = 1;
++ }
++ (void) close (sock); /* Close it up again */
++ if (failure)
++ exit (1);
++}
++
++static void
++tcpping (portnum, argc, argv)
++ u_short portnum;
++ int argc;
++ char **argv;
++{
++ struct timeval to;
++ struct sockaddr_in addr;
++ enum clnt_stat rpc_stat;
++ CLIENT *client;
++ u_long prognum, vers, minvers, maxvers;
++ int sock = RPC_ANYSOCK;
++ struct rpc_err rpcerr;
++ int failure;
++
++ if (argc &lt; 2 || argc &gt; 3)
++ {
++ usage ();
++ exit (1);
++ }
++ prognum = getprognum (argv[1]);
++ get_inet_address (&amp;addr, argv[0]);
++ failure = 0;
++ if (argc == 2)
++ {
++ /*
++ * A call to version 0 should fail with a program/version
++ * mismatch, and give us the range of versions supported.
++ */
++ addr.sin_port = htons (portnum);
++ if ((client = clnttcp_create (&amp;addr, prognum, MIN_VERS,
++ &amp;sock, 0, 0)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu is not available\n&quot;), prognum);
++ exit (1);
++ }
++ to.tv_sec = 10;
++ to.tv_usec = 0;
++ rpc_stat = clnt_call (client, NULLPROC, (xdrproc_t) xdr_void, NULL,
++ (xdrproc_t) xdr_void, NULL, to);
++ if (rpc_stat == RPC_PROGVERSMISMATCH)
++ {
++ clnt_geterr (client, &amp;rpcerr);
++ minvers = rpcerr.re_vers.low;
++ maxvers = rpcerr.re_vers.high;
++ }
++ else if (rpc_stat == RPC_SUCCESS)
++ {
++ /*
++ * Oh dear, it DOES support version 0.
++ * Let's try version MAX_VERS.
++ */
++ addr.sin_port = htons (portnum);
++ if ((client = clnttcp_create (&amp;addr, prognum, MAX_VERS,
++ &amp;sock, 0, 0)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu version %lu is not available\n&quot;),
++ prognum, MAX_VERS);
++ exit (1);
++ }
++ to.tv_sec = 10;
++ to.tv_usec = 0;
++ rpc_stat = clnt_call (client, NULLPROC, (xdrproc_t) xdr_void,
++ NULL, (xdrproc_t) xdr_void, NULL, to);
++ if (rpc_stat == RPC_PROGVERSMISMATCH)
++ {
++ clnt_geterr (client, &amp;rpcerr);
++ minvers = rpcerr.re_vers.low;
++ maxvers = rpcerr.re_vers.high;
++ }
++ else if (rpc_stat == RPC_SUCCESS)
++ {
++ /*
++ * It also supports version MAX_VERS.
++ * Looks like we have a wise guy.
++ * OK, we give them information on all
++ * 4 billion versions they support...
++ */
++ minvers = 0;
++ maxvers = MAX_VERS;
++ }
++ else
++ {
++ (void) pstatus (client, prognum, MAX_VERS);
++ exit (1);
++ }
++ }
++ else
++ {
++ (void) pstatus (client, prognum, MIN_VERS);
++ exit (1);
++ }
++ clnt_destroy (client);
++ (void) close (sock);
++ sock = RPC_ANYSOCK; /* Re-initialize it for later */
++ for (vers = minvers; vers &lt;= maxvers; vers++)
++ {
++ addr.sin_port = htons (portnum);
++ if ((client = clnttcp_create (&amp;addr, prognum, vers,
++ &amp;sock, 0, 0)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu version %lu is not available\n&quot;),
++ prognum, vers);
++ exit (1);
++ }
++ to.tv_usec = 0;
++ to.tv_sec = 10;
++ rpc_stat = clnt_call (client, 0, (xdrproc_t) xdr_void, NULL,
++ (xdrproc_t) xdr_void, NULL, to);
++ if (pstatus (client, prognum, vers) &lt; 0)
++ failure = 1;
++ clnt_destroy (client);
++ (void) close (sock);
++ sock = RPC_ANYSOCK;
++ }
++ }
++ else
++ {
++ vers = getvers (argv[2]);
++ addr.sin_port = htons (portnum);
++ if ((client = clnttcp_create (&amp;addr, prognum, vers, &amp;sock,
++ 0, 0)) == NULL)
++ {
++ clnt_pcreateerror (&quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu version %lu is not available\n&quot;),
++ prognum, vers);
++ exit (1);
++ }
++ to.tv_usec = 0;
++ to.tv_sec = 10;
++ rpc_stat = clnt_call (client, 0, (xdrproc_t) xdr_void, NULL,
++ (xdrproc_t) xdr_void, NULL, to);
++ if (pstatus (client, prognum, vers) &lt; 0)
++ failure = 1;
++ }
++ if (failure)
++ exit (1);
++}
++
++/*
++ * This routine should take a pointer to an &quot;rpc_err&quot; structure, rather than
++ * a pointer to a CLIENT structure, but &quot;clnt_perror&quot; takes a pointer to
++ * a CLIENT structure rather than a pointer to an &quot;rpc_err&quot; structure.
++ * As such, we have to keep the CLIENT structure around in order to print
++ * a good error message.
++ */
++static int
++pstatus (client, prognum, vers)
++ register CLIENT *client;
++ u_long prognum;
++ u_long vers;
++{
++ struct rpc_err rpcerr;
++
++ clnt_geterr (client, &amp;rpcerr);
++ if (rpcerr.re_status != RPC_SUCCESS)
++ {
++ clnt_perror (client, &quot;rpcinfo&quot;);
++ printf (_(&quot;program %lu version %lu is not available\n&quot;), prognum, vers);
++ return -1;
++ }
++ else
++ {
++ printf (_(&quot;program %lu version %lu ready and waiting\n&quot;), prognum, vers);
++ return 0;
++ }
++}
++
++static void
++pmapdump (argc, argv)
++ int argc;
++ char **argv;
++{
++ struct sockaddr_in server_addr;
++ register struct hostent *hp;
++ struct pmaplist *head = NULL;
++ int socket = RPC_ANYSOCK;
++ struct timeval minutetimeout;
++ register CLIENT *client;
++ struct rpcent *rpc;
++
++ if (argc &gt; 1)
++ {
++ usage ();
++ exit (1);
++ }
++ if (argc == 1)
++ get_inet_address (&amp;server_addr, argv[0]);
++ else
++ {
++ bzero ((char *) &amp;server_addr, sizeof server_addr);
++ server_addr.sin_family = AF_INET;
++ if ((hp = gethostbyname (&quot;localhost&quot;)) != NULL)
++ bcopy (hp-&gt;h_addr, (caddr_t) &amp; server_addr.sin_addr,
++ hp-&gt;h_length);
++ else
++ server_addr.sin_addr.s_addr = inet_addr (&quot;0.0.0.0&quot;);
++ }
++ minutetimeout.tv_sec = 60;
++ minutetimeout.tv_usec = 0;
++ server_addr.sin_port = htons (PMAPPORT);
++ if ((client = clnttcp_create (&amp;server_addr, PMAPPROG,
++ PMAPVERS, &amp;socket, 50, 500)) == NULL)
++ {
++ clnt_pcreateerror (_(&quot;rpcinfo: can't contact portmapper&quot;));
++ exit (1);
++ }
++ if (clnt_call (client, PMAPPROC_DUMP, (xdrproc_t) xdr_void, NULL,
++ (xdrproc_t) xdr_pmaplist, (caddr_t) &amp;head,
++ minutetimeout) != RPC_SUCCESS)
++ {
++ fputs (_(&quot;rpcinfo: can't contact portmapper&quot;), stderr);
++ fputs (&quot;: &quot;, stderr);
++ clnt_perror (client, &quot;rpcinfo&quot;);
++ exit (1);
++ }
++ if (head == NULL)
++ {
++ fputs (_(&quot;No remote programs registered.\n&quot;), stdout);
++ }
++ else
++ {
++ fputs (_(&quot; program vers proto port\n&quot;), stdout);
++ for (; head != NULL; head = head-&gt;pml_next)
++ {
++ printf (&quot;%10ld%5ld&quot;,
++ head-&gt;pml_map.pm_prog,
++ head-&gt;pml_map.pm_vers);
++ if (head-&gt;pml_map.pm_prot == IPPROTO_UDP)
++ printf (&quot;%6s&quot;, &quot;udp&quot;);
++ else if (head-&gt;pml_map.pm_prot == IPPROTO_TCP)
++ printf (&quot;%6s&quot;, &quot;tcp&quot;);
++ else
++ printf (&quot;%6ld&quot;, head-&gt;pml_map.pm_prot);
++ printf (&quot;%7ld&quot;, head-&gt;pml_map.pm_port);
++ rpc = getrpcbynumber (head-&gt;pml_map.pm_prog);
++ if (rpc)
++ printf (&quot; %s\n&quot;, rpc-&gt;r_name);
++ else
++ printf (&quot;\n&quot;);
++ }
++ }
++}
++
++/*
++ * reply_proc collects replies from the broadcast.
++ * to get a unique list of responses the output of rpcinfo should
++ * be piped through sort(1) and then uniq(1).
++ */
++
++/*ARGSUSED */
++static bool_t
++reply_proc (res, who)
++ void *res; /* Nothing comes back */
++ struct sockaddr_in *who; /* Who sent us the reply */
++{
++ register struct hostent *hp;
++
++ hp = gethostbyaddr ((char *) &amp;who-&gt;sin_addr, sizeof who-&gt;sin_addr,
++ AF_INET);
++ printf (&quot;%s %s\n&quot;, inet_ntoa (who-&gt;sin_addr),
++ (hp == NULL) ? _(&quot;(unknown)&quot;) : hp-&gt;h_name);
++ fflush(stdout);
++ return FALSE;
++}
++
++static void
++brdcst (argc, argv)
++ int argc;
++ char **argv;
++{
++ enum clnt_stat rpc_stat;
++ u_long prognum, vers;
++
++ if (argc != 2)
++ {
++ usage ();
++ exit (1);
++ }
++ prognum = getprognum (argv[0]);
++ vers = getvers (argv[1]);
++ rpc_stat = clnt_broadcast (prognum, vers, NULLPROC, (xdrproc_t) xdr_void,
++ NULL, (xdrproc_t) xdr_void, NULL,
++ (resultproc_t) reply_proc);
++ if ((rpc_stat != RPC_SUCCESS) &amp;&amp; (rpc_stat != RPC_TIMEDOUT))
++ {
++ fprintf (stderr, _(&quot;rpcinfo: broadcast failed: %s\n&quot;),
++ clnt_sperrno (rpc_stat));
++ exit (1);
++ }
++ exit (0);
++}
++
++static void
++deletereg (argc, argv)
++ int argc;
++ char **argv;
++{
++ u_long prog_num, version_num;
++
++ if (argc != 2)
++ {
++ usage ();
++ exit (1);
++ }
++ if (getuid ())
++ { /* This command allowed only to root */
++ fputs (_(&quot;Sorry. You are not root\n&quot;), stderr);
++ exit (1);
++ }
++ prog_num = getprognum (argv[0]);
++ version_num = getvers (argv[1]);
++ if ((pmap_unset (prog_num, version_num)) == 0)
++ {
++ fprintf (stderr, _(&quot;rpcinfo: Could not delete registration for prog %s version %s\n&quot;),
++ argv[0], argv[1]);
++ exit (1);
++ }
++}
++
++static void
++usage ()
++{
++ fputs (_(&quot;Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n&quot;),
++ stderr);
++ fputs (_(&quot; rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n&quot;),
++ stderr);
++ fputs (_(&quot; rpcinfo -p [ host ]\n&quot;), stderr);
++ fputs (_(&quot; rpcinfo -b prognum versnum\n&quot;), stderr);
++ fputs (_(&quot; rpcinfo -d prognum versnum\n&quot;), stderr);
++}
++
++static u_long
++getprognum (arg)
++ char *arg;
++{
++ register struct rpcent *rpc;
++ register u_long prognum;
++
++ if (isalpha (*arg))
++ {
++ rpc = getrpcbyname (arg);
++ if (rpc == NULL)
++ {
++ fprintf (stderr, _(&quot;rpcinfo: %s is unknown service\n&quot;), arg);
++ exit (1);
++ }
++ prognum = rpc-&gt;r_number;
++ }
++ else
++ {
++ prognum = (u_long) atoi (arg);
++ }
++
++ return prognum;
++}
++
++static u_long
++getvers (arg)
++ char *arg;
++{
++ register u_long vers;
++
++ vers = (int) atoi (arg);
++ return vers;
++}
++
++static void
++get_inet_address (addr, host)
++ struct sockaddr_in *addr;
++ char *host;
++{
++ register struct hostent *hp;
++
++ bzero ((char *) addr, sizeof *addr);
++ addr-&gt;sin_addr.s_addr = (u_long) inet_addr (host);
++ if (addr-&gt;sin_addr.s_addr == INADDR_NONE
++ || addr-&gt;sin_addr.s_addr == INADDR_ANY)
++ {
++ if ((hp = gethostbyname (host)) == NULL)
++ {
++ fprintf (stderr, _(&quot;rpcinfo: %s is unknown host\n&quot;),
++ host);
++ exit (1);
++ }
++ bcopy (hp-&gt;h_addr, (char *) &amp;addr-&gt;sin_addr, hp-&gt;h_length);
++ }
++ addr-&gt;sin_family = AF_INET;
++}
+
+
+Property changes on: drakx/trunk/tools/rpcinfo-flushed.c
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/serial_probe/Makefile
+===================================================================
+--- drakx/trunk/tools/serial_probe/Makefile (rev 0)
++++ drakx/trunk/tools/serial_probe/Makefile 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,13 @@
++CFLAGS = -Wall -Os
++CFILES = $(wildcard *.c)
++OFILES = $(CFILES:%.c=%.o)
++GOAL = serial_probe
++
++$(GOAL): $(OFILES)
++
++serial.o: serial.c serial.h device.h kudzu.h
++serial_probe.o: serial_probe.c serial.h device.h
++serial_probe: serial_probe.o
++
++clean:
++ rm -f $(GOAL) $(OFILES) *~
+
+
+Property changes on: drakx/trunk/tools/serial_probe/Makefile
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/serial_probe/device.h
+===================================================================
+--- drakx/trunk/tools/serial_probe/device.h (rev 0)
++++ drakx/trunk/tools/serial_probe/device.h 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,104 @@
++/* Copyright 1999-2003 Red Hat, Inc.
++ *
++ * This software may be freely redistributed under the terms of the GNU
++ * public license.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++
++#ifndef _KUDZU_DEVICES_H_
++#define _KUDZU_DEVICES_H_
++
++#include &lt;stdio.h&gt;
++
++enum deviceClass {
++ /* device classes... this is somewhat ad-hoc */
++ CLASS_UNSPEC = ~0,
++ CLASS_OTHER = (1 &lt;&lt; 0),
++ CLASS_NETWORK = (1 &lt;&lt; 1),
++ CLASS_SCSI = (1 &lt;&lt; 2),
++ CLASS_MOUSE = (1 &lt;&lt; 3),
++ CLASS_AUDIO = (1 &lt;&lt; 4),
++ CLASS_CDROM = (1 &lt;&lt; 5),
++ CLASS_MODEM = (1 &lt;&lt; 6),
++ CLASS_VIDEO = (1 &lt;&lt; 7),
++ CLASS_TAPE = (1 &lt;&lt; 8),
++ CLASS_FLOPPY = (1 &lt;&lt; 9),
++ CLASS_SCANNER = (1 &lt;&lt; 10),
++ CLASS_HD = (1 &lt;&lt; 11),
++ CLASS_RAID = (1 &lt;&lt; 12),
++ CLASS_PRINTER = (1 &lt;&lt; 13),
++ CLASS_CAPTURE = (1 &lt;&lt; 14),
++ CLASS_KEYBOARD = (1 &lt;&lt; 15),
++ CLASS_MONITOR = (1 &lt;&lt; 16),
++ CLASS_USB = (1 &lt;&lt; 17),
++ CLASS_SOCKET = (1 &lt;&lt; 18),
++ CLASS_FIREWIRE = (1 &lt;&lt; 19),
++ CLASS_IDE = (1 &lt;&lt; 20)
++};
++
++/* Update this if needed */
++#define CLASS_LAST CLASS_IDE
++
++enum deviceBus {
++ /* 'bus' that a device is attached to... this is also ad-hoc */
++ /* BUS_SBUS is sort of a misnomer - it's more or less Sun */
++ /* OpenPROM probing of all various associated non-PCI buses */
++ BUS_UNSPEC = ~0,
++ BUS_OTHER = (1 &lt;&lt; 0),
++ BUS_PCI = (1 &lt;&lt; 1),
++ BUS_SBUS = (1 &lt;&lt; 2),
++ BUS_SERIAL = (1 &lt;&lt; 3),
++ BUS_PSAUX = (1 &lt;&lt; 4),
++ BUS_PARALLEL = (1 &lt;&lt; 5),
++ BUS_SCSI = (1 &lt;&lt; 6),
++ BUS_IDE = (1 &lt;&lt; 7),
++ /* Again, misnomer */
++ BUS_KEYBOARD = (1 &lt;&lt; 8),
++ BUS_DDC = (1 &lt;&lt; 9),
++ BUS_USB = (1 &lt;&lt; 10),
++ BUS_ISAPNP = (1 &lt;&lt; 11),
++ BUS_MISC = (1 &lt;&lt; 12),
++ BUS_FIREWIRE = (1 &lt;&lt; 13),
++ BUS_PCMCIA = (1 &lt;&lt; 14),
++ BUS_ADB = (1 &lt;&lt; 15),
++ BUS_MACIO = (1 &lt;&lt; 16)
++};
++
++struct device {
++ /* This pointer is used to make lists by the library. */
++ /* Do not expect it to remain constant (or useful) across library calls. */
++ struct device *next;
++ /* Used for ordering, and for aliasing (modem0, modem1, etc.) */
++ int index;
++ enum deviceClass type; /* type */
++ enum deviceBus bus; /* bus it's attached to */
++ char * device; /* device file associated with it */
++ char * driver; /* driver to load, if any */
++ char * desc; /* a description */
++ int detached; /* should we care if it disappears? */
++ struct device *(*newDevice) (struct device *old, struct device *new);
++ void (*freeDevice) (struct device *dev);
++ void (*writeDevice) (FILE *file, struct device *dev);
++ int (*compareDevice) (struct device *dev1, struct device *dev2);
++};
++
++struct device *newDevice(struct device *old, struct device *new);
++void freeDevice(struct device *dev);
++void writeDevice(FILE *file, struct device *dev);
++int compareDevice(struct device *dev1, struct device *dev2);
++struct device *readDevice(FILE *file);
++
++/* Most of these aren't implemented yet...... */
++/* Return everything found, even non-useful stuff */
++#define PROBE_ALL 1
++/* Don't do 'dangerous' probes that could do weird things (isapnp, serial) */
++#define PROBE_SAFE (1&lt;&lt;1)
++/* Stop at first device found */
++#define PROBE_ONE (1&lt;&lt;2)
++
++#endif
+
+
+Property changes on: drakx/trunk/tools/serial_probe/device.h
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/serial_probe/kudzu.h
+===================================================================
+--- drakx/trunk/tools/serial_probe/kudzu.h (rev 0)
++++ drakx/trunk/tools/serial_probe/kudzu.h 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,26 @@
++/* Copyright 1999-2003 Red Hat, Inc.
++ *
++ * This software may be freely redistributed under the terms of the GNU
++ * public license.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#ifndef _KUDZU_H_
++#define _KUDZU_H_
++
++/* kudzu: it grows on you */
++
++/* level of debugging output */
++#undef DEBUG_LEVEL
++
++#ifdef DEBUG_LEVEL
++#define DEBUG(s...) fprintf(stderr,s)
++#else
++#define DEBUG(s...) ;
++#endif
++
++#endif
+
+
+Property changes on: drakx/trunk/tools/serial_probe/kudzu.h
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/serial_probe/serial.c
+===================================================================
+--- drakx/trunk/tools/serial_probe/serial.c (rev 0)
++++ drakx/trunk/tools/serial_probe/serial.c 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,1136 @@
++/* Copyright 1999-2003 Red Hat, Inc.
++ *
++ * This software may be freely redistributed under the terms of the GNU
++ * public license.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ * probe serial port for PnP/Legacy devices
++ */
++
++
++#include &lt;stdio.h&gt;
++#include &lt;stdlib.h&gt;
++#include &lt;fcntl.h&gt;
++#include &lt;unistd.h&gt;
++#include &lt;termios.h&gt;
++#include &lt;errno.h&gt;
++#include &lt;string.h&gt;
++#include &lt;signal.h&gt;
++#include &lt;time.h&gt;
++#include &lt;libgen.h&gt;
++#include &lt;sys/time.h&gt;
++#include &lt;sys/types.h&gt;
++#include &lt;sys/stat.h&gt;
++#include &lt;sys/ioctl.h&gt;
++#include &lt;sys/sysmacros.h&gt;
++
++#include &lt;asm/types.h&gt;
++#include &lt;linux/serial.h&gt;
++
++#include &quot;serial.h&quot;
++#include &quot;kudzu.h&quot;
++
++/* character strings ARE null-terminated in the following structure */
++/* these elements are marked with a (string) in the comment */
++/* If PnP device sent 6 bit data stream, we've xlated by a 0x20 offset */
++/* When computing checksum, must remove this offset */
++struct pnp_com_id {
++ unsigned char xlate_6bit; /* does this contain xlated data */
++ unsigned char other_id[17]; /* backward compatibility with pre-PNP */
++ unsigned char other_len; /* length of the other_id */
++ unsigned char pnp_rev[2]; /* PnP revision bytes */
++ unsigned char pnp_rev_str[8]; /* PnP revision (string version) */
++ unsigned char eisa_id[4]; /* EISA Mfr identifier (string) */
++ unsigned char product_id[5]; /* Mfr determined product ID (string) */
++ unsigned char serial_number[9];/* Optional dev serial number (string) */
++ unsigned char class_name[33]; /* Optional PnP Class name (string) */
++ unsigned char driver_id[42]; /* Optional compat device IDs (string) */
++ unsigned char user_name[42]; /* Optional verbose product descr (string)*/
++ unsigned char checksum[2]; /* Optional checksum */
++};
++
++/* there are two possible bytes to signify the start of a PnP ID string */
++#define BeginPnP1 0x28
++#define BeginPnP2 0x08
++
++/* Likewise, two possible stop bytes */
++#define EndPnP1 0x29
++#define EndPnP2 0x09
++
++/* these chars indicate extensions to the base dev id exist */
++#define ExtendPnP1 0x5c
++#define ExtendPnP2 0x3c
++
++#define PNP_COM_MAXLEN 256
++
++/* results from initiating hardware probe of a hardware device */
++#define PNP_COM_FATAL 1 /* system error, check errno */
++#define PNP_COM_FAIL 2 /* probe ok, but found nothing */
++#define PNP_COM_OK 3 /* probe ok, we found it */
++
++/* types of devices we might find */
++/* if PNP_COM_PNPDEV is NOT set, its a legacy device */
++#define PNP_COM_MOUSE 1 /* its a mouse */
++#define PNP_COM_MODEM 2 /* its a modem */
++#define PNP_COM_OTHER 4 /* device is there, cant tell what kind */
++#define PNP_COM_NOEXIST 8 /* no device seen */
++#define PNP_COM_PNPDEV 512 /* its a PNP device */
++
++static void serialFreeDevice(struct serialDevice *dev) {
++ if (dev-&gt;pnpmfr) free(dev-&gt;pnpmfr);
++ if (dev-&gt;pnpmodel) free(dev-&gt;pnpmodel);
++ if (dev-&gt;pnpcompat) free(dev-&gt;pnpcompat);
++ if (dev-&gt;pnpdesc) free(dev-&gt;pnpdesc);
++ freeDevice((struct device *)dev);
++}
++
++static void serialWriteDevice(FILE *file, struct serialDevice *dev)
++{
++ writeDevice(file, (struct device *) dev);
++ if (dev-&gt;pnpmfr)
++ fprintf(file,&quot;pnpmfr: %s\n&quot;,dev-&gt;pnpmfr);
++ if (dev-&gt;pnpmodel)
++ fprintf(file,&quot;pnpmodel: %s\n&quot;,dev-&gt;pnpmodel);
++ if (dev-&gt;pnpcompat)
++ fprintf(file,&quot;pnpcompat: %s\n&quot;,dev-&gt;pnpcompat);
++ if (dev-&gt;pnpdesc)
++ fprintf(file,&quot;pnpdesc: %s\n&quot;,dev-&gt;pnpdesc);
++}
++
++static int serialCompareDevice( struct serialDevice *dev1, struct serialDevice *dev2)
++{
++ int x;
++
++ x = compareDevice((struct device *)dev1, (struct device *)dev2);
++ if (x &amp;&amp; x!=2) return x;
++ if (dev1-&gt;pnpmfr &amp;&amp; dev2-&gt;pnpmfr &amp;&amp; strcmp(dev1-&gt;pnpmfr,dev2-&gt;pnpmfr))
++ return 1;
++ if ((!dev1-&gt;pnpmfr || !dev2-&gt;pnpmfr) &amp;&amp; (dev1-&gt;pnpmfr != dev2-&gt;pnpmfr))
++ return 1;
++ if (dev1-&gt;pnpmodel &amp;&amp; dev2-&gt;pnpmodel &amp;&amp; strcmp(dev1-&gt;pnpmodel,dev2-&gt;pnpmodel))
++ return 1;
++ if ((!dev1-&gt;pnpmodel || !dev2-&gt;pnpmodel) &amp;&amp; (dev1-&gt;pnpmodel != dev2-&gt;pnpmodel))
++ return 1;
++ if (dev1-&gt;pnpcompat &amp;&amp; dev2-&gt;pnpcompat &amp;&amp; strcmp(dev1-&gt;pnpcompat,dev2-&gt;pnpcompat))
++ return 1;
++ if ((!dev1-&gt;pnpcompat || !dev2-&gt;pnpcompat) &amp;&amp; (dev1-&gt;pnpcompat != dev2-&gt;pnpcompat))
++ return 1;
++ if (dev1-&gt;pnpdesc &amp;&amp; dev2-&gt;pnpdesc &amp;&amp; strcmp(dev1-&gt;pnpdesc,dev2-&gt;pnpdesc))
++ return 1;
++ if ((!dev1-&gt;pnpdesc || !dev2-&gt;pnpdesc) &amp;&amp; (dev1-&gt;pnpdesc != dev2-&gt;pnpdesc))
++ return 1;
++ return x;
++}
++
++
++struct serialDevice * serialNewDevice(struct serialDevice *dev) {
++ struct serialDevice *ret;
++
++ ret = malloc(sizeof(struct serialDevice));
++ memset(ret,'\0',sizeof(struct serialDevice));
++ ret=(struct serialDevice *)newDevice((struct device *)dev,(struct device *)ret);
++ ret-&gt;bus = BUS_SERIAL;
++ ret-&gt;newDevice = serialNewDevice;
++ ret-&gt;freeDevice = serialFreeDevice;
++ ret-&gt;writeDevice = serialWriteDevice;
++ ret-&gt;compareDevice = serialCompareDevice;
++ if (dev &amp;&amp; dev-&gt;bus == BUS_SERIAL) {
++ if (dev-&gt;pnpmfr)
++ ret-&gt;pnpmfr=strdup(dev-&gt;pnpmfr);
++ if (dev-&gt;pnpmodel)
++ ret-&gt;pnpmodel=strdup(dev-&gt;pnpmodel);
++ if (dev-&gt;pnpcompat)
++ ret-&gt;pnpcompat=strdup(dev-&gt;pnpcompat);
++ if (dev-&gt;pnpdesc)
++ ret-&gt;pnpdesc=strdup(dev-&gt;pnpdesc);
++ }
++ return ret;
++}
++
++/*
++ * wait_input - wait until there is data available on fd,
++ * for the length of time specified by *timo (indefinite
++ * if timo is NULL).
++ */
++
++static int wait_for_input (int fd, struct timeval *timo) {
++ fd_set ready;
++ int n;
++
++ FD_ZERO(&amp;ready);
++ FD_SET(fd, &amp;ready);
++
++ n = select(fd+1, &amp;ready, NULL, &amp;ready, timo);
++ return n;
++}
++
++static int open_serial_port( char *port ) {
++ int fd;
++
++ DEBUG(&quot;opening serial port %s...&quot;, port);
++
++ fd = open( port, O_RDWR | O_NONBLOCK);
++ if (fd &lt; 0) {
++ DEBUG(&quot;failed.\n&quot;);
++ return -1;
++ } else {
++ DEBUG(&quot;successful.\n&quot;);
++ }
++
++ /* reset file so it is no longer in non-blocking mode */
++ if (fcntl(fd, F_SETFL, 0) &lt; 0) {
++ close(fd);
++ DEBUG(&quot;Failed to set port to non-blocking mode\n&quot;);
++ return -1;
++ }
++
++ return fd;
++}
++
++/* &lt;0 means ioctl error occurred */
++static int get_serial_lines( int fd ) {
++ int modem_lines;
++
++ ioctl(fd, TIOCMGET, &amp;modem_lines);
++ return modem_lines;
++}
++
++/* &lt;0 means ioctl error occurred */
++static int set_serial_lines( int fd, int modem_lines ) {
++ return ioctl(fd, TIOCMSET, &amp;modem_lines);
++}
++
++/* set serial port to 1200 baud, 'nbits' bits, 1 stop, no parity */
++static int setup_serial_port( int fd, int nbits, struct termios *attr ) {
++
++ DEBUG(&quot;setting up serial port\n&quot;);
++
++ attr-&gt;c_iflag = IGNBRK | IGNPAR;
++ attr-&gt;c_cflag = 0;
++ attr-&gt;c_cflag &amp;= ~(CSIZE | CSTOPB | PARENB | PARODD | PARENB);
++ attr-&gt;c_cflag |= CREAD | CLOCAL; /*| CRTSCTS ; */
++ if (nbits == 7)
++ attr-&gt;c_cflag |= CS7 | CSTOPB;
++ else
++ attr-&gt;c_cflag |= CS8;
++ attr-&gt;c_oflag = 0;
++ attr-&gt;c_lflag = 0;
++
++ attr-&gt;c_cc[VMIN] = 1;
++ attr-&gt;c_cc[VTIME] = 5;
++
++ if (cfsetospeed( attr, B1200))
++ return -1;
++ if (cfsetispeed( attr, B1200))
++ return -1;
++ return tcsetattr(fd, TCSANOW, attr);
++}
++
++/* Initialize the serial port to a known state *before* probing. This is
++ * apparently required for some Logitech mice, who will stubbornly refuse
++ * to respond to PnP probes after they've been opened by gpm or XFree.
++ */
++
++static int init_port(int fd) {
++ struct termios attr;
++
++ if (tcgetattr(fd,&amp;attr))
++ return 1;
++
++ cfsetospeed(&amp;attr, B2400);
++ cfsetispeed(&amp;attr, B2400);
++ attr.c_iflag = IXON | ICRNL;
++ attr.c_cflag = CLOCAL | HUPCL | CREAD | B9600 | CS8;
++ attr.c_oflag = 0;
++ attr.c_lflag = 0;
++ return tcsetattr(fd, TCSANOW, &amp;attr);
++}
++
++
++/* Request for PnP info from serial device */
++/* See page 6 of the pnpcom doc from Microsoft */
++/* Return code tells us what happened */
++/* */
++/* PNP_COM_FATAL - error, errno has reason */
++/* PNP_COM_OK - probe initiated successfully */
++static int init_pnp_com_seq1( int fd ) {
++ int modem_lines;
++ int temp;
++ int dsr_status;
++ int rc = PNP_COM_OK;
++ struct termios portattr;
++
++ DEBUG(&quot;initializing 1st PNP sequence\n&quot;);
++ if (init_port(fd))
++ return PNP_COM_FATAL;
++
++ modem_lines = get_serial_lines(fd);
++
++ /* COM port initialization, check for device enumerate */
++
++ /* turn on DTR, turn off RTS */
++ modem_lines |= TIOCM_DTR;
++ modem_lines &amp;= ~TIOCM_RTS;
++ set_serial_lines(fd, modem_lines);
++
++ /* wait 200ms for DSR=1 */
++ usleep(200000);
++
++ dsr_status = get_serial_lines(fd) &amp; TIOCM_DSR;
++ /* see if we got DSR coming up */
++
++ if (!dsr_status) {
++ DEBUG(&quot;Device did not set DSR\n&quot;);
++ }
++
++ /* COM port Setup, 1st phase */
++ temp = tcgetattr(fd, &amp;portattr);
++ if (temp &lt; 0)
++ return PNP_COM_FATAL;
++
++ /* now we set port to be 1200 baud, 7 bits, no parity, 1 stop bit */
++ temp = setup_serial_port( fd, 7, &amp;portattr );
++ if (temp &lt; 0)
++ return PNP_COM_FATAL;
++
++ /* we drop DTR and RTS */
++ modem_lines &amp;= ~( TIOCM_RTS | TIOCM_DTR);
++ set_serial_lines(fd, modem_lines);
++ usleep(200000);
++
++ /* bring DTR back up */
++ modem_lines |= TIOCM_DTR;
++ set_serial_lines(fd, modem_lines);
++ usleep(200000);
++
++ /* Wait for response, 1st phase */
++ modem_lines |= TIOCM_RTS;
++ set_serial_lines(fd, modem_lines);
++ /* usleep(200000); =&gt; AQ: not valid as we should look to receive data during this time!! */
++
++ return rc;
++}
++
++
++/* Request for PnP info from serial device */
++/* See page 6 of the pnpcom doc from Microsoft */
++/* Always returns PNP_COM_OK */
++static int init_pnp_com_seq2( int fd ) {
++ int modem_lines;
++ int rc = PNP_COM_OK;
++
++ DEBUG(&quot;initializing 2nd PNP sequence\n&quot;);
++
++ modem_lines = get_serial_lines(fd);
++
++ /* COM port setup, 2nd phase */
++ /* turn off DTR and RTS */
++ modem_lines &amp;= ~(TIOCM_DTR | TIOCM_RTS);
++ set_serial_lines(fd, modem_lines);
++ usleep(200000);
++
++ /* wait for response, 2nd phase */
++ /* turn on DTR and RTS */
++ modem_lines |= (TIOCM_DTR | TIOCM_RTS);
++ set_serial_lines(fd, modem_lines);
++ /* usleep(200000); =&gt; AQ: not valid as we should look to receive data during this time!! */
++
++ return rc;
++}
++
++
++/* Request for PnP info from serial modem device */
++/* Uses ATI9 code, may not do anything but return 'ERROR' */
++/* Return code tells us what happened */
++/* */
++/* PNP_COM_FATAL - error, errno has reason */
++/* PNP_COM_OK - probe initiated successfully */
++/* PNP_COM_FAIL - DSR never came on - try alterntives */
++/* means (ATI9?) to get PnP string */
++static int init_pnp_com_ati9( int fd ) {
++ int modem_lines;
++ int temp;
++ int done;
++ int respindex;
++ int starttime;
++ unsigned char resp[100], buf[2];
++ struct timeval timo;
++ struct termios portattr;
++
++ DEBUG(&quot;Querying ATI9 info from modem\n&quot;);
++ modem_lines = get_serial_lines(fd);
++
++ /* turn off RTS */
++ modem_lines &amp;= ~TIOCM_RTS;
++ set_serial_lines(fd, modem_lines);
++
++ /* wait 200ms for DSR=1 */
++ usleep(200000);
++
++ /* now we set port to be 1200 baud, 8 bits, no parity, 1 stop bit */
++ temp = tcgetattr(fd, &amp;portattr);
++ if (temp &lt; 0) {
++ modem_lines |= TIOCM_DTR | TIOCM_RTS;
++ set_serial_lines(fd, modem_lines);
++ return PNP_COM_FATAL;
++ }
++
++ /* goto 1200 baud, 8 bits */
++ temp = setup_serial_port( fd, 8, &amp;portattr );
++ if (temp &lt; 0) {
++ modem_lines |= TIOCM_DTR | TIOCM_RTS;
++ set_serial_lines(fd, modem_lines);
++ return PNP_COM_FATAL;
++ }
++
++ /* turn on DTR and RTS */
++ modem_lines = get_serial_lines(fd);
++ modem_lines |= TIOCM_RTS | TIOCM_DTR;
++ set_serial_lines(fd, modem_lines);
++ usleep(200000);
++
++ /* send the 'AT' command */
++ DEBUG(&quot;Sending ATI9 command to modem\n&quot;);
++
++ write(fd, &quot;ATI9\r&quot;, 5);
++
++ /* start reading - read the AT command back */
++ done = 0;
++ respindex= 0;
++ starttime=time(NULL);
++ memset(resp, 0, sizeof(resp));
++ while (!done) {
++ timo.tv_sec=0;
++ timo.tv_usec=250000;
++ if (wait_for_input(fd, &amp;timo) &gt; 0) {
++ temp = read( fd, buf, 1 );
++ if (temp &lt; 0) {
++ if (errno != EAGAIN)
++ return PNP_COM_FATAL;
++ } else {
++ resp[respindex++] = buf[0];
++ resp[respindex] = 0;
++ }
++ } else
++ done = 1;
++
++ /* shouldnt run more than 5 seconds */
++ if (time(NULL)-starttime &gt; 5 )
++ done = 1;
++
++ if (respindex &gt; 6)
++ done = 1;
++
++ if (strstr(resp, &quot;ATI9\r&quot;))
++ done = 1;
++
++ DEBUG(&quot;ATI9 probe -&gt;%d \&quot;%s\&quot;\n&quot;,respindex, resp);
++ }
++
++ /* see if we saw the 'OK' response */
++ if (strstr(resp, &quot;(&quot;))
++ return PNP_COM_OK;
++ else
++ return PNP_COM_FAIL;
++
++ return PNP_COM_OK;
++}
++
++/* See if this is a legacy mouse device */
++/* Only called if the PnP probe above failed */
++/* We turn off the mouse via RS232 lines, then turn it on */
++/* If it spits out an 'M' character (at 1200 baud, 7N1) */
++/* it could be a mouse. */
++/* */
++/* Return code tells us what happened */
++/* */
++/* PNP_COM_FATAL - error, errno has reason */
++/* PNP_COM_OK - probe saw 'M' */
++/* PNP_COM_FAIL - Never saw the 'M' response */
++
++static int find_legacy_mouse( int fd ) {
++ int modem_lines;
++ int temp;
++ int done;
++ int starttime;
++ unsigned char resp[2];
++ struct timeval timo;
++ struct termios portattr;
++
++ DEBUG(&quot;looking for a legacy mouse\n&quot;);
++
++ /* now we set port to be 1200 baud, 7 bits, no parity, 1 stop bit */
++ temp = tcgetattr(fd, &amp;portattr);
++ if (temp &lt; 0)
++ return PNP_COM_FATAL;
++
++ /* goto 1200 baud, etc etc*/
++ temp = setup_serial_port( fd, 7, &amp;portattr );
++ if (temp &lt; 0)
++ return PNP_COM_FATAL;
++
++ /* we drop DTR and RTS */
++ modem_lines = get_serial_lines(fd);
++ modem_lines &amp;= ~( TIOCM_RTS | TIOCM_DTR);
++ set_serial_lines(fd, modem_lines);
++ usleep(200000);
++
++ /* bring them DTR back up */
++ modem_lines |= TIOCM_DTR | TIOCM_RTS;
++ set_serial_lines(fd, modem_lines);
++
++ /* start reading - after first character we quit */
++ done = 0;
++ starttime=time(NULL);
++ while (!done) {
++ timo.tv_sec=0;
++ timo.tv_usec=250000;
++ if (wait_for_input(fd, &amp;timo) &gt; 0) {
++ temp = read( fd, resp, 1 );
++ if (temp &lt; 0) {
++ if (errno != EAGAIN)
++ return PNP_COM_FATAL;
++ } else {
++ done = 1;
++ }
++ } else
++ done = 1;
++
++
++ /* shouldnt run more than 2 seconds */
++ if (time(NULL)-starttime &gt; 2 )
++ done = 1;
++ }
++ if (*resp == 'M') {
++ DEBUG(&quot;Found legacy mouse\n&quot;);
++ return PNP_COM_OK;
++ } else
++ return PNP_COM_FAIL;
++}
++
++/* See if this is a legacy modem device */
++/* Only called if the PnP probe above failed */
++/* We send a '!AT' and see if we get an 'OK' back */
++/* */
++/* Return code tells us what happened */
++/* */
++/* PNP_COM_FATAL - error, errno has reason */
++/* PNP_COM_OK - probe saw 'OK' */
++/* PNP_COM_FAIL - Never saw the 'OK' response */
++static int find_legacy_modem( int fd ) {
++ int modem_lines;
++ int temp;
++ int done;
++ int respindex;
++ int starttime;
++ unsigned char resp[10], buf[2];
++ struct timeval timo;
++ struct termios portattr;
++
++ DEBUG(&quot;looking for a legacy modem\n&quot;);
++
++ /* now we set port to be 1200 baud, 8 bits, no parity, 1 stop bit */
++ temp = tcgetattr(fd, &amp;portattr);
++ if (temp &lt; 0)
++ return PNP_COM_FATAL;
++
++ /* goto 1200 baud, 8 bits */
++ temp = setup_serial_port( fd, 8, &amp;portattr );
++ if (temp &lt; 0)
++ return PNP_COM_FATAL;
++
++ /* turn on DTR and RTS */
++ modem_lines = get_serial_lines(fd);
++ modem_lines |= TIOCM_RTS | TIOCM_DTR;
++ set_serial_lines(fd, modem_lines);
++ usleep(200000);
++
++ /* send the 'AT' command */
++ DEBUG(&quot;Sending AT command to modem\n&quot;);
++
++ write(fd, &quot;AT\r&quot;, 3);
++
++ /* start reading - we'll get AT command back first, then modem response */
++ done = 0;
++ respindex= 0;
++ starttime=time(NULL);
++ memset(resp, 0, sizeof(resp));
++ while (!done) {
++ timo.tv_sec=0;
++ timo.tv_usec=250000;
++ if (wait_for_input(fd, &amp;timo) &gt; 0) {
++ temp = read( fd, buf, 1 );
++ if (temp &lt; 0) {
++ if (errno != EAGAIN)
++ return PNP_COM_FATAL;
++ } else {
++ resp[respindex++] = buf[0];
++ }
++ } else
++ done = 1;
++
++ /* shouldnt run more than 5 seconds */
++ if (time(NULL)-starttime &gt; 5 )
++ done = 1;
++
++ if (respindex &gt; 9)
++ done = 1;
++ }
++
++ /* see if we saw the 'OK' response */
++ if (strstr(resp, &quot;OK&quot;))
++ return PNP_COM_OK;
++ else
++ return PNP_COM_FAIL;
++}
++
++/* retrieve the PnP ID string */
++/* timeout after 3 seconds */
++/* should probably set a 200 msec timeout per char, as spec says */
++/* if no char received, we're done */
++static int read_pnp_string( int fd, unsigned char *pnp_string, int *pnp_len, int pnp_stringbuf_size ) {
++ int pnp_index;
++ int temp, done, counter;
++ int seen_start;
++ time_t starttime;
++ struct timeval timo;
++ unsigned char buf[80];
++ unsigned char end_char;
++
++ DEBUG(&quot;Attempting to read PNP ID string\n&quot;);
++
++ /* see if we have any input waiting */
++ pnp_index = 0;
++ seen_start = 0;
++ done = 0;
++ end_char = 0;
++ starttime=time(NULL);
++ while (!done) {
++ timo.tv_sec=0;
++ timo.tv_usec=250000;
++ if (wait_for_input(fd, &amp;timo) &gt; 0) {
++ temp = read( fd, buf, 1 );
++ if (temp &lt; 0) {
++ if (errno != EAGAIN)
++ return PNP_COM_FAIL;
++ } else {
++ for (counter=0; counter &lt; temp; counter++) {
++ pnp_string[pnp_index++] = buf[counter];
++ if (seen_start) {
++ if (buf[counter] == end_char) {
++ done=1;
++ break;
++ }
++ } else {
++ if (buf[counter] == BeginPnP1) {
++ seen_start = 1;
++ end_char = EndPnP1;
++ } else if (buf[counter] == BeginPnP2) {
++ seen_start = 1;
++ end_char = EndPnP2;
++ }
++ }
++ }
++ }
++ } else
++ done = 1;
++
++ /* shouldnt run more than 3 seconds */
++ if (time(NULL)-starttime &gt; 3 )
++ done = 1;
++
++ if (pnp_index &gt;= pnp_stringbuf_size)
++ done = 1;
++ }
++ pnp_string[pnp_index] = 0;
++ *pnp_len=pnp_index;
++ if(*pnp_len &gt; 0)
++ return PNP_COM_OK;
++ else /* allows to call seq2 to be conformant */
++ return PNP_COM_FAIL;
++}
++
++/* parse the PnP ID string into components */
++static int parse_pnp_string( unsigned char *pnp_id_string, int pnp_len,
++ struct pnp_com_id *pnp_id ) {
++ unsigned char *p1, *p2;
++ unsigned char *start;
++ unsigned char *end;
++ unsigned char *curpos;
++ unsigned char *endfield;
++ unsigned char *temppos;
++ unsigned char *pnp_string;
++ unsigned char end_char;
++
++ int no_more_extensions=0;
++ int stage;
++ int len;
++ unsigned short int checksum;
++ char hex_checksum[5];
++
++ char extension_delims[] = {EndPnP1, EndPnP2, ExtendPnP1, ExtendPnP2, 0};
++ char end_delims[] = {EndPnP1, EndPnP2, 0};
++ unsigned char* p1end = NULL;
++ unsigned char* p2end = NULL;
++
++ /* clear out pnp_id */
++ memset(pnp_id, 0, sizeof(*pnp_id));
++
++ /* copy pnp_string to temp space */
++ pnp_string = alloca(pnp_len+1);
++ memcpy(pnp_string, pnp_id_string, pnp_len+1);
++
++ /* first find the start of the PnP part of string */
++ p1 = memchr( pnp_string, BeginPnP1, pnp_len );
++ p2 = memchr( pnp_string, BeginPnP2, pnp_len );
++
++
++ if (p1) {
++ int p_len = pnp_len - (p1 - pnp_string);
++ p1end = memchr(p1, EndPnP1, p_len);
++ }
++ if (p2) {
++ int p_len = pnp_len - (p2 - pnp_string);
++ p2end = memchr(p2, EndPnP2, p_len);
++ }
++
++ /* use the one which points nearest to start of the string */
++ /* and is actually defined */
++ if ( p1 &amp;&amp; p1end &amp;&amp; p2 &amp;&amp; p2end ) {
++ start = (p1 &lt; p2) ? p1 : p2;
++ } else if ( p1 &amp;&amp; p1end )
++ start = p1;
++ else if ( p2 &amp;&amp; p2end )
++ start = p2;
++ else
++ start = NULL;
++
++ /* if no start then we're done */
++ if (!start)
++ return -1;
++
++ /* the length of the initial part cannot be more than 17 bytes */
++ if ((start - pnp_string) &gt; 17)
++ return -1;
++
++ /* setup end character we are looking for based on the start character */
++ if (start == p2) {
++ pnp_id-&gt;xlate_6bit = 1;
++ end_char = EndPnP2;
++ /* we need to xlate data in PnP fields */
++ /* remember to skip the revision fields (bytes 1 and 2 after start) */
++ temppos=start;
++ while (1) {
++ if (*temppos == EndPnP2) {
++ *temppos += 0x20;
++ break;
++ } else if (temppos != start+1 &amp;&amp; temppos != start+2 )
++ *temppos += 0x20;
++
++ temppos++;
++ }
++ } else {
++ pnp_id-&gt;xlate_6bit = 0;
++ end_char = EndPnP1;
++ }
++
++ /* move everything before the start of the PnP block */
++ memcpy(pnp_id-&gt;other_id, pnp_string, start-pnp_string);
++ pnp_id-&gt;other_len = start - pnp_string;
++
++ /* now we get the PnP fields - all were zero'd out above */
++ curpos = start+1;
++ memcpy(pnp_id-&gt;pnp_rev,curpos,2); curpos += 2;
++ memcpy(pnp_id-&gt;eisa_id,curpos,3); curpos += 3;
++ memcpy(pnp_id-&gt;product_id,curpos,4); curpos += 4;
++ /* now we see if have extension fields */
++ no_more_extensions = 0;
++ stage = 0;
++ while (!no_more_extensions) {
++ if (*curpos == ExtendPnP1 || *curpos == ExtendPnP2) {
++ curpos++;
++ endfield = strpbrk(curpos, extension_delims);
++ if (!endfield)
++ return -1;
++ /* if we reached the end of all PnP data, back off */
++ /* cause there is a checksum at the end of extension data */
++ if (*endfield == EndPnP1 || *endfield == EndPnP2)
++ endfield -= 2;
++ } else
++ break;
++
++ len = endfield - curpos;
++ switch (stage) {
++ case 0:
++ if (len != 8 &amp;&amp; len != 0 )
++ return -1;
++
++ memcpy(pnp_id-&gt;serial_number,curpos,len);
++ curpos += len;
++ break;
++
++ case 1:
++ if (len &gt; 33)
++ return -1;
++ memcpy(pnp_id-&gt;class_name, curpos, len);
++ curpos = endfield;
++ break;
++
++ case 2:
++ if (len &gt; 41)
++ return -1;
++ memcpy(pnp_id-&gt;driver_id, curpos, len);
++ curpos = endfield;
++ break;
++
++ case 3:
++ if (len &gt; 41)
++ return -1;
++ memcpy(pnp_id-&gt;user_name, curpos, len);
++ curpos = endfield;
++ break;
++ }
++ stage++;
++ }
++
++ /* now find the end of all PnP data */
++ end = strpbrk(curpos, end_delims);
++ if (!end)
++ return -1;
++
++ /* if we had any extensions, we expect an checksum */
++ if (stage != 0) {
++ /* copy checksum into struct */
++ memcpy(pnp_id-&gt;checksum, curpos, 2);
++
++ /* compute the checksum as the sum of all PnP bytes, excluding */
++ /* the two byte checksum. */
++ checksum = 0;
++ for (temppos=start; temppos &lt;= end; temppos++) {
++ /* skip checksum in calculation */
++ if (temppos == (end-2) || temppos == (end-1))
++ continue;
++ /* dont xlate the revision at start */
++ if (temppos != (start+1) &amp;&amp; temppos != (start+2))
++ checksum += *temppos - ((pnp_id-&gt;xlate_6bit) ? 0x20 : 0);
++ else
++ checksum += *temppos;
++ }
++ sprintf(hex_checksum, &quot;%.2X&quot;, checksum &amp; 0xff);
++ if (strncmp(hex_checksum, pnp_id-&gt;checksum, 2))
++ return -1;
++ }
++
++ /* checksum was ok, so we're done */
++ return 0;
++}
++
++static int attempt_pnp_retrieve(int fd, char *pnp_string, int *pnp_strlen, int pnp_stringbuf_size) {
++ int pnp_probe_status;
++ struct pnp_com_id pnp_id;
++ int tried_at_prodding=0, give_up=0;
++
++ DEBUG(&quot;Attempting PNP information retrieval\n&quot;);
++
++ while (!give_up) {
++ pnp_probe_status = init_pnp_com_seq1(fd);
++ if (pnp_probe_status == PNP_COM_FATAL)
++ return PNP_COM_FATAL;
++ pnp_probe_status = read_pnp_string(fd, pnp_string, pnp_strlen,
++ pnp_stringbuf_size);
++ if (pnp_probe_status == PNP_COM_FAIL) {
++ init_pnp_com_seq2(fd); /* always succeeds */
++
++ pnp_probe_status = read_pnp_string(fd, pnp_string, pnp_strlen,
++ pnp_stringbuf_size);
++ }
++
++ if (*pnp_strlen == 1 &amp;&amp; pnp_string[0] == 'M') /* legacy mouse */
++ return PNP_COM_OK;
++ /* see if we got anything useful, if not try AT command */
++ /* to prod device into correct serial params */
++ if (parse_pnp_string( pnp_string, *pnp_strlen, &amp;pnp_id )&lt;0) {
++ DEBUG(&quot;That failed.\n&quot;);
++ if (!tried_at_prodding) {
++ DEBUG(&quot;Prod modem with AT command.\n&quot;);
++ write(fd, &quot;AT\r&quot;, 3);
++ tried_at_prodding=1;
++ } else
++ give_up = 1;
++ } else
++ return PNP_COM_OK;
++ }
++
++ /* normal PNP detection has failed. */
++ /* try sending a ATI9 code to the modem to see if we get PnP id back */
++ init_pnp_com_ati9(fd);
++ read_pnp_string(fd, pnp_string, pnp_strlen, pnp_stringbuf_size );
++ if (parse_pnp_string( pnp_string, *pnp_strlen, &amp;pnp_id )&lt;0) {
++ *pnp_strlen = 0;
++ pnp_string[0] = 0;
++ return PNP_COM_FAIL;
++ } else
++ return PNP_COM_OK;
++}
++
++struct device *serialProbe(enum deviceClass probeClass, int probeFlags,
++ struct device *devlist) {
++ int fd;
++ int temp;
++ int pnp_strlen;
++ int devicetype=-1;
++ unsigned char pnp_string[100];
++ char port[20];
++ struct termios origattr;
++ struct pnp_com_id pnp_id;
++ struct serialDevice *serdev;
++ struct stat sb;
++ int maj, twelve=12;
++ int console=-1;
++ int stdin_line=-1;
++ struct serial_struct si;
++
++ DEBUG(&quot;Probing for serial ports\n&quot;);
++
++ if (probeFlags &amp; PROBE_SAFE) return devlist;
++
++ /* Are we on a serial console? */
++ fstat(0,&amp;sb);
++ maj = major(sb.st_rdev);
++ if (maj != 4 &amp;&amp; (maj &lt; 136 || maj &gt; 143)) {
++ if (ioctl (0, TIOCLINUX, &amp;twelve) &lt; 0) {
++ if (ioctl (0, TIOCGSERIAL, &amp;si) &gt;= 0) {
++ if (si.line &gt; 0) {
++ stdin_line = 1 &lt;&lt; si.line;
++ } else {
++ stdin_line = 0;
++ }
++ } else stdin_line = 0;
++ }
++ }
++
++ fd=open(&quot;/dev/console&quot;,O_RDWR);
++ if (fd != -1) {
++ fstat(fd,&amp;sb);
++ maj = major(sb.st_rdev);
++ if (maj != 4 &amp;&amp; (maj &lt; 136 || maj &gt; 143)) {
++ if (ioctl (fd, TIOCLINUX, &amp;twelve) &lt; 0) {
++ #ifdef __powerpc__
++ // we could have gotten an error for another reason - like EINVAL
++ // skipping ttyS0 on PPC - which is where most modems reside
++ if (errno == ENOTTY) {
++ #endif
++ if (ioctl (fd, TIOCGSERIAL, &amp;si) &gt;= 0) {
++ if (si.line &gt; 0) {
++ console = 1 &lt;&lt; si.line;
++ } else {
++ console = 0;
++ #ifdef __powerpc__
++ }
++ #endif
++ }
++ } else console = 0;
++ }
++ }
++ close(fd);
++ }
++
++
++ if (
++ (probeClass &amp; CLASS_UNSPEC) ||
++ (probeClass &amp; CLASS_OTHER) ||
++ (probeClass &amp; CLASS_MOUSE) ||
++ (probeClass &amp; CLASS_MODEM) ||
++ (probeClass &amp; CLASS_PRINTER)
++ ) {
++ int x;
++
++ for (x=0; x&lt;=3 ; x++) {
++ struct stat sbuf;
++ char lockfile[32];
++ if (x==console || x==stdin_line) continue;
++ snprintf(port,20,&quot;/dev/ttyS%d&quot;,x);
++
++ /* Make sure it's not in use */
++ snprintf(lockfile,32,&quot;/var/lock/LCK..ttyS%d&quot;,x);
++ if (!stat(lockfile,&amp;sbuf)) {
++ DEBUG(&quot;Port %s in use, skipping probe.\n&quot;,
++ port);
++ continue;
++ }
++ memset(lockfile,'\0',32);
++ if (readlink(&quot;/dev/modem&quot;,lockfile,32)&gt;0) {
++ if (!strcmp(basename(port),basename(lockfile))) {
++ snprintf(lockfile,32,&quot;/var/lock/LCK..modem&quot;);
++ if (!stat(lockfile,&amp;sbuf)) {
++ DEBUG(&quot;Port %s in use, skipping probe.\n&quot;,
++ port);
++ continue;
++ }
++ }
++ }
++
++ if ((fd=open_serial_port(port)) &lt; 0) {
++ continue;
++ }
++ /* save the current state of the port */
++ temp = tcgetattr(fd, &amp;origattr);
++ if (temp &lt; 0) {
++ DEBUG(&quot;unable to retrieve port attributes...no port present?\n&quot;);
++ close(fd);
++ continue;
++ }
++
++
++ /* try twiddling RS232 control lines and see if it talks to us */
++ devicetype=-1;
++ pnp_strlen = 0;
++ if (attempt_pnp_retrieve( fd, pnp_string, &amp;pnp_strlen,
++ sizeof(pnp_string) - 1 ) == PNP_COM_FATAL)
++ goto endprobe;
++
++ /* see if we found any PnP signature */
++ if (pnp_strlen != 0 &amp;&amp; (pnp_strlen != 1 || pnp_string[0] != 'M')) {
++
++ /* fill in the PnP com structure */
++ if (parse_pnp_string( pnp_string, pnp_strlen, &amp;pnp_id )&lt;0) {
++ DEBUG(&quot;Got PNP data back, but failed to parse. Aborting\n&quot;);
++ goto endprobe;
++ } else {
++ char *foo;
++ int len;
++
++ DEBUG(&quot;PNP data parsed.\n&quot;);
++ serdev = serialNewDevice(NULL);
++
++ if (pnp_id.user_name[0]) {
++ serdev-&gt;pnpdesc = strdup(pnp_id.user_name);
++ len = strlen(pnp_id.eisa_id) +
++ strlen(pnp_id.product_id) +
++ strlen(pnp_id.user_name) + 3;
++ foo = malloc(len);
++ snprintf(foo,len,&quot;%s|%s %s&quot;,pnp_id.eisa_id,
++ pnp_id.product_id,pnp_id.user_name);
++ } else {
++ len = strlen(pnp_id.eisa_id) +
++ strlen(pnp_id.product_id) + 3;
++ foo = malloc(len);
++ snprintf(foo,len,&quot;%s|%s&quot;,pnp_id.eisa_id,
++ pnp_id.product_id);
++ }
++ if (serdev-&gt;desc) free(serdev-&gt;desc);
++ serdev-&gt;desc=strdup(foo);
++ serdev-&gt;device=strdup(port+5);
++ if (serdev-&gt;driver) free(serdev-&gt;driver);
++ serdev-&gt;driver=strdup(&quot;ignore&quot;);
++ serdev-&gt;pnpmfr = strdup(pnp_id.eisa_id);
++ serdev-&gt;pnpmodel = strdup(pnp_id.product_id);
++
++ free(foo);
++ foo=pnp_id.product_id;
++ if (pnp_id.driver_id) {
++ if (strstr(pnp_id.driver_id,&quot;PNP&quot;))
++ foo = strstr(pnp_id.driver_id,&quot;PNP&quot;)+3;
++ serdev-&gt;pnpcompat = strdup(pnp_id.driver_id);
++ }
++
++ if (*pnp_id.other_id == 'M' ||
++ !strncmp(pnp_id.class_name, &quot;MOUSE&quot;, 5) ||
++ !strncmp(foo, &quot;0F&quot;, 2)) {
++ serdev-&gt;type = CLASS_MOUSE;
++ if (!strncmp(serdev-&gt;desc, &quot;|&quot;, 1)) {
++ free(serdev-&gt;desc);
++ serdev-&gt;desc=strdup(&quot;Generic Serial Mouse&quot;);
++ }
++ if (serdev-&gt;driver) free(serdev-&gt;driver);
++ serdev-&gt;driver = strdup(&quot;generic&quot;);
++ }
++ else if (!strncmp(pnp_id.class_name, &quot;MODEM&quot;, 5) ||
++ !strncmp(foo, &quot;C&quot;, 1))
++ serdev-&gt;type = CLASS_MODEM;
++ else if (!strncmp(pnp_id.class_name, &quot;PRINTER&quot;, 7))
++ serdev-&gt;type = CLASS_PRINTER;
++ else
++ serdev-&gt;type = CLASS_OTHER;
++ if (serdev-&gt;type &amp; probeClass) {
++ if (devlist)
++ serdev-&gt;next = devlist;
++ devlist = (struct device *)serdev;
++ if (probeFlags &amp; PROBE_ONE) {
++ tcsetattr(fd, TCSANOW, &amp;origattr);
++ tcflush(fd, TCIOFLUSH);
++ close(fd);
++ return devlist;
++ }
++ } else {
++ serdev-&gt;freeDevice(serdev);
++ }
++ goto endprobe;
++ }
++ } else {
++ DEBUG(&quot;No PNP data received.\n&quot;);
++ /* try to find a legacy device */
++
++ temp = find_legacy_mouse(fd);
++ if (temp == PNP_COM_FATAL) {
++ goto endprobe;
++ } else if (temp == PNP_COM_OK) {
++ if (probeClass &amp; CLASS_MOUSE) {
++ serdev=serialNewDevice(NULL);
++ serdev-&gt;type = CLASS_MOUSE;
++ serdev-&gt;device = strdup(port+5);
++ serdev-&gt;driver= strdup(&quot;generic&quot;);
++ serdev-&gt;desc = strdup(&quot;Generic Serial Mouse&quot;);
++ if (devlist)
++ serdev-&gt;next = devlist;
++ devlist = (struct device *)serdev;
++ if (probeFlags &amp; PROBE_ONE) {
++ tcsetattr(fd, TCSANOW, &amp;origattr);
++ tcflush(fd, TCIOFLUSH);
++ close(fd);
++ return devlist;
++ }
++ }
++ goto endprobe;
++ } else {
++ DEBUG(&quot;Didn't see a legacy mouse.\n&quot;);
++
++ temp = find_legacy_modem(fd);
++ if (temp == PNP_COM_FATAL) {
++ goto endprobe;
++ } else if (temp == PNP_COM_OK) {
++ DEBUG(&quot;Legacy modem signature seen.\n&quot;);
++ if (probeClass &amp; CLASS_MODEM) {
++ serdev=serialNewDevice(NULL);
++ serdev-&gt;type = CLASS_MODEM;
++ serdev-&gt;device = strdup(port+5);
++ serdev-&gt;driver= strdup(&quot;ignore&quot;);
++ serdev-&gt;desc = strdup(&quot;Generic Serial Modem&quot;);
++ if (devlist)
++ serdev-&gt;next = devlist;
++ devlist = (struct device *)serdev;
++ if (probeFlags &amp; PROBE_ONE) {
++ tcsetattr(fd, TCSANOW, &amp;origattr);
++ tcflush(fd, TCIOFLUSH);
++ close(fd);
++ return devlist;
++ }
++ }
++ goto endprobe;
++ } else {
++ DEBUG(&quot;Didnt see a legacy modem, game over.\n&quot;);
++ }
++ }
++ }
++ endprobe:
++ DEBUG(&quot;Restoring original port attributes\n&quot;);
++ tcsetattr(fd, TCSANOW, &amp;origattr);
++ tcflush(fd, TCIOFLUSH);
++ close(fd);
++ }
++ }
++ return devlist;
++}
+
+
+Property changes on: drakx/trunk/tools/serial_probe/serial.c
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/serial_probe/serial.h
+===================================================================
+--- drakx/trunk/tools/serial_probe/serial.h (rev 0)
++++ drakx/trunk/tools/serial_probe/serial.h 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,43 @@
++/* Copyright 1999-2003 Red Hat, Inc.
++ *
++ * This software may be freely redistributed under the terms of the GNU
++ * public license.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#ifndef _KUDZU_SERIAL_H_
++#define _KUDZU_SERIAL_H_
++
++#include &quot;device.h&quot;
++
++struct serialDevice {
++ /* common fields */
++ struct device *next; /* next device in list */
++ int index;
++ enum deviceClass type; /* type */
++ enum deviceBus bus; /* bus it's attached to */
++ char * device; /* device file associated with it */
++ char * driver; /* driver to load, if any */
++ char * desc; /* a description */
++ int detached;
++ /* serial-specific fields */
++ struct serialDevice *(*newDevice) (struct serialDevice *dev);
++ void (*freeDevice) (struct serialDevice *dev);
++ void (*writeDevice) (FILE *file, struct serialDevice *dev);
++ int (*compareDevice) (struct serialDevice *dev1, struct serialDevice *dev2);
++ char * pnpmfr;
++ char * pnpmodel;
++ char * pnpcompat;
++ char * pnpdesc;
++
++};
++
++struct serialDevice *serialNewDevice(struct serialDevice *dev);
++struct device *serialProbe(enum deviceClass probeClass, int probeFlags,
++ struct device *devlist);
++
++#endif
+
+
+Property changes on: drakx/trunk/tools/serial_probe/serial.h
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/serial_probe/serial_probe.c
+===================================================================
+--- drakx/trunk/tools/serial_probe/serial_probe.c (rev 0)
++++ drakx/trunk/tools/serial_probe/serial_probe.c 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,114 @@
++/* Copyright 1999 Mandrakesoft &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">fpons at mandrakesoft.com</A>&gt;
++ *
++ * The following file used by this one are copyrighted by RedHat and
++ * are taken from kudzu :
++ * device.h
++ * serial.h
++ * serial.c
++ * This file is taken from kudzu.c copyrighted by RedHat, 1999.
++ *
++ * This software may be freely redistributed under the terms of the GNU
++ * public license.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#include &lt;stdio.h&gt;
++#include &lt;string.h&gt;
++#include &lt;stdlib.h&gt;
++
++#include &quot;serial.h&quot;
++#include &quot;device.h&quot;
++
++typedef struct device *(newFunc)(struct device *);
++typedef int (initFunc)();
++typedef struct device *(probeFunc)(enum deviceClass, int, struct device *);
++
++char *classStrings[] = {
++ &quot;UNSPEC&quot;, &quot;OTHER&quot;, &quot;NETWORK&quot;, &quot;SCSI&quot;, &quot;VIDEO&quot;, &quot;AUDIO&quot;,
++ &quot;MOUSE&quot;, &quot;MODEM&quot;, &quot;CDROM&quot;, &quot;TAPE&quot;, &quot;FLOPPY&quot;, &quot;SCANNER&quot;,
++ &quot;HD&quot;, &quot;RAID&quot;, &quot;PRINTER&quot;, &quot;CAPTURE&quot;, &quot;KEYBOARD&quot;, NULL
++};
++
++struct device *newDevice(struct device *old, struct device *new) {
++ if (!old) {
++ if (!new) {
++ new = malloc(sizeof(struct device));
++ memset(new,'\0',sizeof(struct device));
++ }
++ new-&gt;type = CLASS_UNSPEC;
++ } else {
++ new-&gt;type = old-&gt;type;
++ if (old-&gt;device) new-&gt;device = strdup(old-&gt;device);
++ if (old-&gt;driver) new-&gt;driver = strdup(old-&gt;driver);
++ if (old-&gt;desc) new-&gt;desc = strdup(old-&gt;desc);
++ }
++ new-&gt;newDevice = newDevice;
++ new-&gt;freeDevice = freeDevice;
++ new-&gt;compareDevice = compareDevice;
++ return new;
++}
++
++void freeDevice(struct device *dev) {
++ if (!dev) {
++ printf(&quot;freeDevice(null)\n&quot;);
++ abort(); /* return; */
++ }
++ if (dev-&gt;device) free (dev-&gt;device);
++ if (dev-&gt;driver) free (dev-&gt;driver);
++ if (dev-&gt;desc) free (dev-&gt;desc);
++ free (dev);
++}
++
++void writeDevice(FILE *file, struct device *dev) {}
++int compareDevice(struct device *dev1, struct device *dev2) { return 0; }
++
++int main () {
++ struct device* devices = NULL;
++ struct serialDevice* serialDevice = NULL;
++
++ devices = serialProbe(CLASS_UNSPEC, 0, devices);
++ while (devices) {
++ serialDevice = (struct serialDevice*)devices;
++
++ printf(&quot;CLASS=&quot;);
++ if (serialDevice-&gt;type == CLASS_UNSPEC) puts(&quot;UNSPEC&quot;); else
++ if (serialDevice-&gt;type == CLASS_OTHER) puts(&quot;OTHER&quot;); else
++ if (serialDevice-&gt;type == CLASS_NETWORK) puts(&quot;NETWORK&quot;); else
++ if (serialDevice-&gt;type == CLASS_SCSI) puts(&quot;SCSI&quot;); else
++ if (serialDevice-&gt;type == CLASS_MOUSE) puts(&quot;MOUSE&quot;); else
++ if (serialDevice-&gt;type == CLASS_AUDIO) puts(&quot;AUDIO&quot;); else
++ if (serialDevice-&gt;type == CLASS_CDROM) puts(&quot;CDROM&quot;); else
++ if (serialDevice-&gt;type == CLASS_MODEM) puts(&quot;MODEM&quot;); else
++ if (serialDevice-&gt;type == CLASS_VIDEO) puts(&quot;VIDEO&quot;); else
++ if (serialDevice-&gt;type == CLASS_TAPE) puts(&quot;TAPE&quot;); else
++ if (serialDevice-&gt;type == CLASS_FLOPPY) puts(&quot;FLOPPY&quot;); else
++ if (serialDevice-&gt;type == CLASS_SCANNER) puts(&quot;SCANNER&quot;); else
++ if (serialDevice-&gt;type == CLASS_HD) puts(&quot;HD&quot;); else
++ if (serialDevice-&gt;type == CLASS_RAID) puts(&quot;RAID&quot;); else
++ if (serialDevice-&gt;type == CLASS_PRINTER) puts(&quot;PRINTER&quot;); else
++ if (serialDevice-&gt;type == CLASS_CAPTURE) puts(&quot;CAPTURE&quot;); else
++ if (serialDevice-&gt;type == CLASS_KEYBOARD) puts(&quot;KEYBOARD&quot;); else
++ if (serialDevice-&gt;type == CLASS_MONITOR) puts(&quot;MONITOR&quot;); else
++ if (serialDevice-&gt;type == CLASS_USB) puts(&quot;USB&quot;); else
++ if (serialDevice-&gt;type == CLASS_SOCKET) puts(&quot;SOCKET&quot;); else
++ if (serialDevice-&gt;type == CLASS_FIREWIRE) puts(&quot;FIREWIRE&quot;); else
++ if (serialDevice-&gt;type == CLASS_IDE) puts(&quot;IDE&quot;);
++ printf(&quot;BUS=SERIAL\n&quot;);
++ printf(&quot;DEVICE=/dev/%s\n&quot;, serialDevice-&gt;device);
++ printf(&quot;DRIVER=%s\n&quot;, serialDevice-&gt;driver);
++ if (!serialDevice-&gt;pnpdesc) printf(&quot;DESCRIPTION=%s\n&quot;, serialDevice-&gt;desc);
++ if (serialDevice-&gt;pnpmfr) printf(&quot;MANUFACTURER=%s\n&quot;, serialDevice-&gt;pnpmfr);
++ if (serialDevice-&gt;pnpmodel) printf(&quot;MODEL=%s\n&quot;, serialDevice-&gt;pnpmodel);
++ if (serialDevice-&gt;pnpcompat) printf(&quot;COMPAT=%s\n&quot;, serialDevice-&gt;pnpcompat);
++ if (serialDevice-&gt;pnpdesc) printf(&quot;DESCRIPTION=%s\n&quot;, serialDevice-&gt;pnpdesc);
++ printf(&quot;\n&quot;);
++
++ devices=devices-&gt;next;
++ }
++
++ return 0;
++}
+
+
+Property changes on: drakx/trunk/tools/serial_probe/serial_probe.c
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/shift_all.pl
+===================================================================
+--- drakx/trunk/tools/shift_all.pl (rev 0)
++++ drakx/trunk/tools/shift_all.pl 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,113 @@
++use MDK::Common;
++
++my %shifts = (
++'af' =&gt; 1,
++'am' =&gt; 1,
++'ar' =&gt; 0,
++'az' =&gt; 1,
++'be' =&gt; 2,
++'bg' =&gt; 2,
++'bn' =&gt; 1,
++'br' =&gt; 2,
++'bs' =&gt; 2,
++'ca' =&gt; 2,
++'cs' =&gt; 2,
++'cy' =&gt; 2,
++'da' =&gt; 2,
++'de' =&gt; 2,
++'el' =&gt; 2,
++'en_GB' =&gt; 2,
++'en_US' =&gt; 2,
++'eo' =&gt; 2,
++'es' =&gt; 2,
++'et' =&gt; 2,
++'eu' =&gt; 2,
++'fa' =&gt; 0,
++'fi' =&gt; 1,
++'fo' =&gt; 2,
++'fr' =&gt; 2,
++'ga' =&gt; 2,
++'gd' =&gt; 2,
++'gl' =&gt; 2,
++'gv' =&gt; 2,
++'he' =&gt; 0,
++'hi' =&gt; 1,
++'hr' =&gt; 2,
++'hu' =&gt; 2,
++'hy' =&gt; 1,
++'ia' =&gt; 2,
++'id' =&gt; 1,
++'is' =&gt; 1,
++'it' =&gt; 1,
++'iu' =&gt; 1,
++'ja' =&gt; 3,
++'ka' =&gt; 1,
++'kn' =&gt; 1,
++'ko' =&gt; 1,
++'kw' =&gt; 0,
++'lo' =&gt; 0,
++'lt' =&gt; 0,
++'lv' =&gt; 0,
++'mi' =&gt; 0,
++'mk' =&gt; 0,
++'mn' =&gt; 0,
++'mr' =&gt; 0,
++'ms' =&gt; 0,
++'mt' =&gt; 0,
++'nb' =&gt; 0,
++'nl' =&gt; 0,
++'nn' =&gt; 0,
++'no' =&gt; 0,
++'oc' =&gt; 0,
++'pl' =&gt; 0,
++'pt_BR' =&gt; 0,
++'pt' =&gt; 0,
++'ro' =&gt; 0,
++'ru' =&gt; 0,
++'sk' =&gt; 0,
++'sl' =&gt; 0,
++'sp' =&gt; 0,
++'sq' =&gt; 0,
++'sr' =&gt; 0,
++'sv' =&gt; 0,
++'ta' =&gt; 1,
++'te' =&gt; 1,
++'tg' =&gt; 0,
++'th' =&gt; 0,
++'tr' =&gt; 0,
++'tt' =&gt; 1,
++'uk' =&gt; 0,
++'ur' =&gt; 1,
++'uz' =&gt; 0,
++'vi' =&gt; 0,
++'wa' =&gt; 0,
++'yi' =&gt; 0,
++'zh_CN' =&gt; 0,
++'zh_TW' =&gt; 0,
++);
++
++foreach (glob(&quot;lang*.png&quot;)) {
++ /lang-(.*)\.png/;
++ exists $shifts{$1} or die &quot;doesn't exist for $_&quot;;
++ $shifts{$1} or next;
++ print &quot;./a.out $_ l.png $shifts{$1}\n&quot;;
++ system(&quot;./a.out $_ l.png $shifts{$1}&quot;);
++ renamef('l.png', $_);
++}
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
+
+Added: drakx/trunk/tools/shift_img.c
+===================================================================
+--- drakx/trunk/tools/shift_img.c (rev 0)
++++ drakx/trunk/tools/shift_img.c 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,165 @@
++/*
++ * Guillaume Cottenceau (gc at mandriva.com)
++ *
++ * Copyright 2002-2005 Mandriva
++ *
++ * This software may be freely redistributed under the terms of the GNU
++ * public license.
++ *
++ */
++
++#include &lt;unistd.h&gt;
++#include &lt;stdio.h&gt;
++#include &lt;string.h&gt;
++#include &lt;stdarg.h&gt;
++
++#define PNG_DEBUG 3
++#include &lt;png.h&gt;
++
++void abort_(const char * s, ...)
++{
++ va_list args;
++ va_start(args, s);
++ vfprintf(stderr, s, args);
++ fprintf(stderr, &quot;\n&quot;);
++ va_end(args);
++ abort();
++}
++
++int x, y;
++
++int width, height;
++png_byte color_type;
++png_byte bit_depth;
++
++png_structp png_ptr;
++png_infop info_ptr;
++int number_of_passes;
++png_bytep * row_pointers;
++
++void read_png_file(char* file_name)
++{
++ char header[8]; // 8 is the maximum size that can be checked
++
++ /* open file and test for it being a png */
++ FILE *fp = fopen(file_name, &quot;rb&quot;);
++ if (!fp)
++ abort_(&quot;[read_png_file] File %s could not be opened for reading&quot;, file_name);
++ fread(header, 1, 8, fp);
++ if (png_sig_cmp(header, 0, 8))
++ abort_(&quot;[read_png_file] File %s is not recognized as a PNG file&quot;, file_name);
++
++
++ /* initialize stuff */
++ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
++
++ if (!png_ptr)
++ abort_(&quot;[read_png_file] png_create_read_struct failed&quot;);
++
++ info_ptr = png_create_info_struct(png_ptr);
++ if (!info_ptr)
++ abort_(&quot;[read_png_file] png_create_info_struct failed&quot;);
++
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[read_png_file] Error during init_io&quot;);
++
++ png_init_io(png_ptr, fp);
++ png_set_sig_bytes(png_ptr, 8);
++
++ png_read_info(png_ptr, info_ptr);
++
++ width = info_ptr-&gt;width;
++ height = info_ptr-&gt;height;
++ color_type = info_ptr-&gt;color_type;
++ bit_depth = info_ptr-&gt;bit_depth;
++
++ number_of_passes = png_set_interlace_handling(png_ptr);
++ png_read_update_info(png_ptr, info_ptr);
++
++
++ /* read file */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[read_png_file] Error during read_image&quot;);
++
++ row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height);
++ for (y=0; y&lt;height; y++)
++ row_pointers[y] = (png_byte*) malloc(info_ptr-&gt;rowbytes);
++
++ png_read_image(png_ptr, row_pointers);
++}
++
++
++void write_png_file(char* file_name)
++{
++ /* create file */
++ FILE *fp = fopen(file_name, &quot;wb&quot;);
++ if (!fp)
++ abort_(&quot;[write_png_file] File %s could not be opened for writing&quot;, file_name);
++
++
++ /* initialize stuff */
++ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
++
++ if (!png_ptr)
++ abort_(&quot;[write_png_file] png_create_write_struct failed&quot;);
++
++ info_ptr = png_create_info_struct(png_ptr);
++ if (!info_ptr)
++ abort_(&quot;[write_png_file] png_create_info_struct failed&quot;);
++
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during init_io&quot;);
++
++ png_init_io(png_ptr, fp);
++
++
++ /* write header */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during writing header&quot;);
++
++ png_set_IHDR(png_ptr, info_ptr, width, height,
++ bit_depth, color_type, PNG_INTERLACE_NONE,
++ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
++
++ png_write_info(png_ptr, info_ptr);
++
++
++ /* write bytes */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during writing bytes&quot;);
++
++ png_write_image(png_ptr, row_pointers);
++
++
++ /* end write */
++ if (setjmp(png_jmpbuf(png_ptr)))
++ abort_(&quot;[write_png_file] Error during end of write&quot;);
++
++ png_write_end(png_ptr, NULL);
++
++}
++
++void process_file(char* shift)
++{
++ int shift_ = atoi(shift);
++
++ if (info_ptr-&gt;color_type != PNG_COLOR_TYPE_RGBA)
++ abort_(&quot;[process_file] color_type of input file must be PNG_COLOR_TYPE_RGBA (is %d)&quot;, info_ptr-&gt;color_type);
++
++ width -= shift_;
++ for (y=0; y&lt;height; y++) {
++ row_pointers[y] += 4 * shift_;
++ }
++
++}
++
++
++int main(int argc, char **argv)
++{
++ if (argc != 4)
++ abort_(&quot;Usage: program_name &lt;file_in&gt; &lt;file_out&gt; &lt;shift&gt;&quot;);
++
++ read_png_file(argv[1]);
++ process_file(argv[3]);
++ write_png_file(argv[2]);
++}
+
+
+Property changes on: drakx/trunk/tools/shift_img.c
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+
+Added: drakx/trunk/tools/simplify-drakx-modules
+===================================================================
+--- drakx/trunk/tools/simplify-drakx-modules (rev 0)
++++ drakx/trunk/tools/simplify-drakx-modules 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,5 @@
++#!/usr/bin/perl -pi
++
++s/^\s*use\s+(diagnostics|strict|vars|warnings).*//g;
++
++/^__END__/ and $_ = '', close ARGV;
+
+
+Property changes on: drakx/trunk/tools/simplify-drakx-modules
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/specific_arch
+===================================================================
+--- drakx/trunk/tools/specific_arch (rev 0)
++++ drakx/trunk/tools/specific_arch 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,9 @@
++#!/usr/bin/perl
++
++use MDK::Common;
++
++print join(' ', map {
++ my $arch = arch();
++ $arch = $compat_arch{$arch} while $arch &amp;&amp; !-e &quot;$_.$arch&quot;;
++ -e &quot;$_.$arch&quot; ? &quot;$_.$arch&quot; : ();
++ } @ARGV), &quot;\n&quot;;
+
+
+Property changes on: drakx/trunk/tools/specific_arch
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: drakx/trunk/tools/xhost+.c
+===================================================================
+--- drakx/trunk/tools/xhost+.c (rev 0)
++++ drakx/trunk/tools/xhost+.c 2011-02-06 23:23:30 UTC (rev 450)
+@@ -0,0 +1,11 @@
++#include &lt;stdlib.h&gt;
++#include &lt;X11/Xlib.h&gt;
++
++
++int main(int argc, char **argv) {
++ Display *d = XOpenDisplay(getenv(&quot;DISPLAY&quot;) ? getenv(&quot;DISPLAY&quot;) : &quot;:0&quot;);
++ if (d == NULL) exit(1);
++ XDisableAccessControl(d);
++ XCloseDisplay(d);
++ exit(0);
++}
+
+
+Property changes on: drakx/trunk/tools/xhost+.c
+___________________________________________________________________
+Added: svn:eol-style
+ + native
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;/pipermail/mageia-sysadm/attachments/20110206/37532f73/attachment.html&gt;
+</PRE>
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="002826.html">[Mageia-sysadm] [448] Add cleaned files
+</A></li>
+ <LI>Next message: <A HREF="002835.html">[Mageia-sysadm] [451] Import stage1
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#2827">[ date ]</a>
+ <a href="thread.html#2827">[ thread ]</a>
+ <a href="subject.html#2827">[ subject ]</a>
+ <a href="author.html#2827">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
+mailing list</a><br>
+</body></html>