Lucas Nussbaum escribió:
> If the reseed execution within postinst fails, it would probably be
> better to just output an error message to warn the user, instead of
> making the package installation fail.
I agree. In this case, it would be better to use print and make reseed
exit before further proceeding in a manner like:
<snip at line 54 of reseed>
unless ($response->{_rc} eq "200") {
print("WARNING: There's no net access at the moment, please run
reseed with a proper net connection before using it.\n");
print("I repeat: I'm not putting any data into the random number
generator $random_device\n");
exit 0;
}
</snip>
I tend to prefer print() over warn() in this case. However, in this case
it remains a maintainer decision. I'm attaching a diff for reseed, just
in case. Thanks for your attention to details.
Jose
--
José M. Parrella -> Debian Sid, k2.6.17.13
Escuela de Ingenieria Electrica
Universidad Central de Venezuela -> ucvlug.info
--- reseed 2006-11-13 12:32:33.000000000 -0400
+++ reseed.patch 2006-11-13 12:44:23.000000000 -0400
@@ -51,7 +51,11 @@
my ($request, $response, @bytes);
$request = new HTTP::Request("GET", $random_url);
$response = $ua->request($request);
-die("no net access\n") unless $response->{_rc} eq "200";
+unless ($response->{_rc} eq "200") {
+ print("WARNING: There's no net access at the moment, please run reseed
with a proper net connection before using it.\n");
+ print("I repeat: I'm not putting any byte stream into the random number
generator $random_device\n");
+ exit 0;
+}
# generate a byte stream from the numbers
@bytes = split /\n/, $response->content();