chrony: Fix gpsd dependency
Without this change, it was not possible to install chrony in an image where gpsd was absent since the first awk command was already reading the gpsd.conf file. BugzID: 74327
This commit is contained in:
parent
9ffbd2425e
commit
778ed6defa
|
|
@ -15,10 +15,10 @@ do_install_append () {
|
||||||
pkg_postinst_${PN}_prepend () {
|
pkg_postinst_${PN}_prepend () {
|
||||||
|
|
||||||
GPSD_CONF=$D${sysconfdir}/default/gpsd.default
|
GPSD_CONF=$D${sysconfdir}/default/gpsd.default
|
||||||
GPSD_OPS=$(awk /GPSD_OPTIONS/ "$GPSD_CONF" )
|
|
||||||
GPSD_OPSPARAM=$(echo "$GPSD_OPS" | awk /-n/)
|
|
||||||
|
|
||||||
if [ -e "$GPSD_CONF" ]; then
|
if [ -e "$GPSD_CONF" ]; then
|
||||||
|
GPSD_OPS=$(awk /GPSD_OPTIONS/ "$GPSD_CONF" )
|
||||||
|
GPSD_OPSPARAM=$(echo "$GPSD_OPS" | awk /-n/)
|
||||||
if [ -z "$GPSD_OPSPARAM" ]; then
|
if [ -z "$GPSD_OPSPARAM" ]; then
|
||||||
GPSD_OPSPARAM="${GPSD_OPS%\"} -n\""
|
GPSD_OPSPARAM="${GPSD_OPS%\"} -n\""
|
||||||
sed -i "s/$GPSD_OPS/$GPSD_OPSPARAM/g" "$GPSD_CONF"
|
sed -i "s/$GPSD_OPS/$GPSD_OPSPARAM/g" "$GPSD_CONF"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue