From: Wichert Akkerman Date: Thu, 16 Dec 1999 23:38:39 +0000 (+0000) Subject: utils/start-stop-daemon.c: Fix OS-detection for sunos X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc410dca4cb9409214f83393221854d61d780a90;p=dpkg utils/start-stop-daemon.c: Fix OS-detection for sunos utils/update-rc.d: Accept single-number values, since they are always in the [0,99] range --- diff --git a/ChangeLog b/ChangeLog index 32885486..7fd2caf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 16 15:20:11 CET 1999 Wichert Akkerman + + * utils/start-stop-daemon.c: Fix OS-detection for sunos + * utils/update-rc.d: Accept single-number values, since they are + always in the [0,99] range + Wed Dec 15 16:08:47 CET 1999 Wichert Akkerman * autogen.sh: copy gettextm4, lcmessage.m4 and progtest.m4 to automake/ diff --git a/debian/changelog b/debian/changelog index 1c0e3ac6..11911caa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ dpkg (1.6.4) unstable; urgency=low Closes: Bug#52580,#52185 * Fix dselect program description, Closes: Bug#52328 * Fix architecture-detection in dpkg-gencontrol, Closes: Bug#52616 + * Accept single-number values in update-rc.d, Closes: Bug#46810 -- Wichert Akkerman UNRELEASED diff --git a/scripts/update-rc.d.pl b/scripts/update-rc.d.pl index a26f9876..8cad4044 100644 --- a/scripts/update-rc.d.pl +++ b/scripts/update-rc.d.pl @@ -124,7 +124,7 @@ sub defaults { $start = $stop = $ARGV[1] if ($#ARGV >= 1); $stop = $ARGV[2] if ($#ARGV >= 2); &usage ("codenumber must be a number between 0 and 99") - if ($start !~ /^\d\d$/ || $stop !~ /^\d\d$/); + if ($start !~ /^\d\d?$/ || $stop !~ /^\d\d?$/); $start = sprintf("%02d", $start); $stop = sprintf("%02d", $stop); @@ -149,7 +149,7 @@ sub startstop { &usage("expected start|stop"); } - if ($ARGV[1] !~ /^\d\d$/) { + if ($ARGV[1] !~ /^\d\d?$/) { &usage("expected NN after $ARGV[0]"); } $NN = sprintf("%02d", $ARGV[1]); diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 9d49f98b..dc5b4870 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -17,16 +17,14 @@ #include "config.h" -#ifdef linux +#if defined(linux) #define OSLinux -#endif - -#ifdef sunos -#define OSsunos -#endif - -#ifdef __GNU__ +#elif defined(__GNU__) #define OSHURD +#elif defined(Sparc) +#define OSsunos +#else +#error Unknown architecture - cannot build start-stop-daemon #endif #ifdef HAVE_HURH_H