It just uncomments the option to request ntp_servers in dhcpcd.conf.
Fixes #331.
DEVS=
EMBEDDED=
AUTH=
+NTP=
POLL=
SMALL=
SANITIZE=no
--enable-privsep) PRIVSEP=yes;;
--disable-seccomp) SECCOMP=no;;
--enable-seccomp) SECCOMP=yes;;
+ --disable-ntp) NTP=no;;
+ --enable-ntp) NTP=yes;;
--privsepuser) PRIVSEP_USER=$var;;
--prefix) PREFIX=$var;prefix=$var;; # prefix is set for autotools compat
--sysconfdir) SYSCONFDIR=$var;;
fi
fi
fi
+if [ "$NTP" = yes ]; then
+ # --enable-ntp
+ echo "UNCOMMENT_NTP= yes" >>$CONFIG_MK
+fi
echo >>$CONFIG_H
echo "#endif /*CONFIG_H*/">>$CONFIG_H
_confinstall:
${INSTALL} -d ${DESTDIR}${SYSCONFDIR}
# Install a new default config if not present
- test -e ${DESTDIR}${SYSCONFDIR}/dhcpcd.conf || \
- ${INSTALL} -m ${CONFMODE} dhcpcd.conf ${DESTDIR}${SYSCONFDIR}
+ if ! [ -e ${DESTDIR}${SYSCONFDIR}/dhcpcd.conf ]; then \
+ ${INSTALL} -m ${CONFMODE} dhcpcd.conf ${DESTDIR}${SYSCONFDIR}; \
+ if [ "${UNCOMMENT_NTP}" = yes ]; then \
+ ${SED} -i \
+ -e 's/#option ntp_servers/option ntp_servers/' \
+ ${DESTDIR}/${SYSCONFDIR}/dhcpcd.conf; \
+ fi; \
+ fi
eginstall: