This commit is fixing the network-manager package detection (use dpkg-query instead of dpkg -l)

Using dpkg-query -s is more appropriate than using dpkg -l and grep -q.
The only way to have 0 returned by dpkg-query -s is to have NM installed
and dpkg -l |grep -q may return 1 if the package is not yet known in the
base (for instance, right after installing).

Signed-off-by: Arnaud Patard <apatard@hupstream.com>