gpsd: Fix gpsd Yocto pyro build for read only rootfs
gpsd: Fix gpsd Yocto pyro build for read only rootfs

Attempting to include gpsd on Yocto pyro with IMAGE_FEATURES including
read-only-rootfs results in an error:
"The following packages could not be configured offline and rootfs is
read-only"

This stems from a failure during the do_rootfs steps where the /etc/init.d/gpsd
file is missing during the call to update-rc.d.

This happens because the /etc/init.d/gpsd file is installed during
package install for gpsd-conf instead of gpsd, and the default value for
INITSCRIPT_PACKAGES is PN.  To resolve, specify INITSCRIPT_PACKAGES as
gpsd-conf instead.

Also, as suggested on the Yocto mailing list, refactor to inherit
update-alternatives and use this to replace the postinst and postrm
steps.

Signed-off-by: Dan Walkes <1853477f5849bd091a945c4672065016fd4c2842@trellis-logic.com>
Signed-off-by: Martin Jansa <516df3ff67e1fa5d153800b15fb204c0a1a389dc@gmail.com>

victronenergy/meta-openembedded,mrchapp/meta-openembedded,lgirdk/meta-openembedded,moto-timo/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,lgirdk/meta-openembedded,amery/meta-openembedded,openembedded/meta-openembedded,kraj/meta-openembedded,victronenergy/meta-openembedded,moto-timo/meta-openembedded,lgirdk/meta-openembedded,mrchapp/meta-openembedded,victronenergy/meta-openembedded,rehsack/meta-openembedded,VCTLabs/meta-openembedded,rehsack/meta-openembedded,VCTLabs/meta-openembedded,amery/meta-openembedded,mrchapp/meta-openembedded,victronenergy/meta-openembedded,moto-timo/meta-openembedded,lgirdk/meta-openembedded,openembedded/meta-openembedded,victronenergy/meta-openembedded,mrchapp/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,amery/meta-openembedded,lgirdk/meta-openembedded,kraj/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,openembedded/meta-openembedded,rehsack/meta-openembedded,VCTLabs/meta-openembedded,kraj/meta-openembedded,schnitzeltony/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,schnitzeltony/meta-openembedded,VCTLabs/meta-openembedded,lgirdk/meta-openembedded,victronenergy/meta-openembedded,lgirdk/meta-openembedded,kraj/meta-openembedded,schnitzeltony/meta-openembedded,rehsack/meta-openembedded,VCTLabs/meta-openembedded,schnitzeltony/meta-openembedded,mrchapp/meta-openembedded,amery/meta-openembedded,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,VCTLabs/meta-openembedded,kraj/meta-openembedded,rehsack/meta-openembedded,mrchapp/meta-openembedded,VCTLabs/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,sigma-embedded/elito-org.openembedded.meta,rehsack/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,mrchapp/meta-openembedded,kraj/meta-openembedded,moto-timo/meta-openembedded,moto-timo/meta-openembedded,VCTLabs/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,amery/meta-openembedded,openembedded/meta-openembedded,kraj/meta-openembedded,amery/meta-openembedded,amery/meta-openembedded,victronenergy/meta-openembedded,schnitzeltony/meta-openembedded,amery/meta-openembedded