[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Way to check installed daemon



On Fri, Apr 20, 2001 at 07:44:22AM +1000, Herbert Xu wrote:
> > test -d /usr/share/doc/openldapd || exit 0 # openldapd not installed
> Debian packages aren't allowed to depend on the existence of stuff in
> doc as they can be removed by the administrator.

Above message in debian-devel got me thinking....

A package I got involved has a runtime script like this.  It trys to
identify whether lpd(BSD) or LPRng is running.  Initially I wrote it by
checking files in /etc/init.d/ but the real current maintainer opted to
check /usr/share/doc/ .  This made sense to me until I read above
comment from one of the debian GURU.

If I have to be sure, I check exit code of following:

dpkg -s lprng| grep -e "^Status: install ok installed"
dpkg -s lpr|   grep -e "^Status: install ok installed"

It will be very slow, though.  Any good way?
-- 
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ 
+  Osamu Aoki <debian@aokiconsulting.com>, GnuPG-key: 1024D/D5DE453D  +
+   Fingerprint: 814E BD64 3288 40E7 E88E  3D92 C3F8 EA94 D5DE 453D   +
+   http://www.aokiconsulting.com/                 Cupertino, CA USA  +

Attachment: pgpuHv0iuzcAF.pgp
Description: PGP signature


Reply to: