dpkg -l network-manager yields true if a package is found in dpkg's availability database, even if it's not installed. netcfg should use something different than that to determine if network-manager is installed.