Re: Way to check installed daemon
Quoting John H. Robinson, IV <firstname.lastname@example.org>:
> how about replacing dpkg -s lprng with
> grep -A1 '^Package: lpr$' /var/lib/dpkg/status
> and grep -e "^Status: install ok installed" with
> grep -q -e "^Status: install ok installed"
> (helps in suppressing unnecessary output)
> comparison times:
> dpkg -s lpr 5.71s user 0.37s system 35% cpu 17.182 total
> grep -A1 '^Package: lpr$' /var/lib/dpkg/status 0.00s user 0.04s system 155% cpu 0.026 total
That depends on an implementation detail in dpkg -- surely that's not
a good idea.
Andrew Stribblehill <email@example.com>
Systems programmer, IT Service, University of Durham, England