+Thu Oct 7 01:16:23 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
+
+ * Check if codenumber is between 0 and 99 instead of just checking
+ for a number
+
Wed Oct 6 14:40:33 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Lock complete lockfile for database: it's empty anyway, and Hurd
* Install locale-files in /usr/share, Closes: Bug# 46631
* Make /usr/share/doc/dpkg-dev a symlink to /usr/share/doc/dpkg
* Actually include fix to make update-alternatives works filesystems (oops!)
+ * Check if codenumber is between 0 and 99, Closes: Bug# 46810
-- Wichert Akkerman <wakkerma@debian.org> Tue, 5 Oct 1999 19:19:05 +0200
}
opendir(DIR, ".");
foreach $_ (readdir(DIR)) {
- next unless (/^[S|K][0-9]*$bn$/);
+ next unless (/^[S|K]\d\d$bn$/);
$fn = "$etcd$i.d/$_";
$found = 1;
$islnk = &is_link ($_[0], $fn, $bn);
&usage ("defaults takes only one or two codenumbers") if ($#ARGV > 2);
$start = $stop = $ARGV[1] if ($#ARGV >= 1);
$stop = $ARGV[2] if ($#ARGV >= 2);
- &usage ("codenumber must be a number")
- if ($start !~ /^[0-9]+$/ || $stop !~ /^[0-9]+$/);
+ &usage ("codenumber must be a number between 0 and 99")
+ if ($start !~ /^\d\d$/ || $stop !~ /^\d\d$/);
$start = sprintf("%02d", $start);
$stop = sprintf("%02d", $stop);
&usage("expected start|stop");
}
- if ($ARGV[1] !~ /^[0-9]+$/) {
+ if ($ARGV[1] !~ /^\d\d$/) {
&usage("expected NN after $ARGV[0]");
}
$NN = sprintf("%02d", $ARGV[1]);