| Submitter | Martin Ertsaas |
|---|---|
| Date | Oct. 25, 2012, 6:58 p.m. |
| Message ID | <1351191528-13408-1-git-send-email-martiert@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/38575/ |
| State | Superseded |
| Headers | show |
Comments
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Op 25-10-12 20:58, Martin Ertsaas schreef: > Change version of ntp to match that in meta-networking. Also change > ntpdate to ntp-date to match the names used in meta-networking. While you are there, can you also disable the autoactivating for the unit? It's broken and I'm gettig tired of doing 'systemctl disable' on it for every system. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: GPGTools - http://gpgtools.org iD8DBQFQijhjMkyGM64RGpERAkBaAJ97niM1IfjERLUg3dOlFXMKLx/TogCgqXv6 X63nMniUZKcmw41+u4BEFKE= =J9a5 -----END PGP SIGNATURE-----
On 10/26/12 09:14, Koen Kooi wrote: > Op 25-10-12 20:58, Martin Ertsaas schreef: > > Change version of ntp to match that in meta-networking. Also change > > ntpdate to ntp-date to match the names used in meta-networking. > > While you are there, can you also disable the autoactivating for the unit? > It's broken and I'm gettig tired of doing 'systemctl disable' on it for > every system. > To disable the autoactivating, were you thinking linking ntpd(ate).service to /dev/null, or something more sophisticated. - Martin > > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
On 10/26/12 10:01, Martin Jansa wrote: > On Fri, Oct 26, 2012 at 09:14:43AM +0200, Koen Kooi wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Op 25-10-12 20:58, Martin Ertsaas schreef: >>> Change version of ntp to match that in meta-networking. Also change >>> ntpdate to ntp-date to match the names used in meta-networking. >> While you are there, can you also disable the autoactivating for the unit? >> It's broken and I'm gettig tired of doing 'systemctl disable' on it for >> every system. > Cannot we fix it? Last time I've noticed it was using wrong binary (not > installed by ntpdate package) from .service file. > > SHR root@qemux86-64 ~ $ opkg files ntpdate > Package ntpdate (4.2.6p3-r7) is installed on root and has the following > files: > /etc/network/if-up.d/ntpdate > /usr/bin/ntpdate > SHR root@qemux86-64 ~ $ grep Exec /lib/systemd/system/ntpdate.service > ExecStart=/usr/bin/ntpd -q -g -x > > Cheers, > > > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel So what is happening is that if you just install ntpdate, it still tries to use ntpd, which doesn't exist? Sorry for the questions now, but I don't have anywhere to test this right now.
On Fri, Oct 26, 2012 at 09:14:43AM +0200, Koen Kooi wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Op 25-10-12 20:58, Martin Ertsaas schreef: > > Change version of ntp to match that in meta-networking. Also change > > ntpdate to ntp-date to match the names used in meta-networking. > > While you are there, can you also disable the autoactivating for the unit? > It's broken and I'm gettig tired of doing 'systemctl disable' on it for > every system. Cannot we fix it? Last time I've noticed it was using wrong binary (not installed by ntpdate package) from .service file. SHR root@qemux86-64 ~ $ opkg files ntpdate Package ntpdate (4.2.6p3-r7) is installed on root and has the following files: /etc/network/if-up.d/ntpdate /usr/bin/ntpdate SHR root@qemux86-64 ~ $ grep Exec /lib/systemd/system/ntpdate.service ExecStart=/usr/bin/ntpd -q -g -x Cheers,
On Fri, Oct 26, 2012 at 09:57:31AM +0200, Martin Ertsås wrote: > On 10/26/12 10:01, Martin Jansa wrote: > > On Fri, Oct 26, 2012 at 09:14:43AM +0200, Koen Kooi wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> Op 25-10-12 20:58, Martin Ertsaas schreef: > >>> Change version of ntp to match that in meta-networking. Also change > >>> ntpdate to ntp-date to match the names used in meta-networking. > >> While you are there, can you also disable the autoactivating for the unit? > >> It's broken and I'm gettig tired of doing 'systemctl disable' on it for > >> every system. > > Cannot we fix it? Last time I've noticed it was using wrong binary (not > > installed by ntpdate package) from .service file. > > > > SHR root@qemux86-64 ~ $ opkg files ntpdate > > Package ntpdate (4.2.6p3-r7) is installed on root and has the following > > files: > > /etc/network/if-up.d/ntpdate > > /usr/bin/ntpdate > > SHR root@qemux86-64 ~ $ grep Exec /lib/systemd/system/ntpdate.service > > ExecStart=/usr/bin/ntpd -q -g -x > > > > Cheers, > > > > > > > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > > So what is happening is that if you just install ntpdate, it still tries > to use ntpd, which doesn't exist? Sorry for the questions now, but I > don't have anywhere to test this right now. Yes, exactly. ExecStart needs to be changed to use ntpdate in ntpdate.service. -ExecStart=/usr/bin/ntpd -q -g -x +ExecStart=/usr/bin/ntpdate pool.ntp.org Maybe we should also add something like Requires=network.target because right now there is only Before=ntpd.service to prevent already used socket (ntpdate[545]: the NTP socket is in use, exiting) Cheers,
* Martin Ertsaas <martiert@gmail.com> [121025 20:59]: > Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to > match the names used in meta-networking. Ping? The versions is meta-networking and meta-systemd needs to be put in sync... Cheers, Anders
Patch
diff --git a/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend b/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend deleted file mode 100644 index c6cd031..0000000 --- a/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend +++ /dev/null @@ -1,20 +0,0 @@ -inherit systemd - -PRINC := "${@int(PRINC) + 1}" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SYSTEMD_PACKAGES = "${PN}-systemd ntpdate-systemd" -SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service" -SYSTEMD_SERVICE_ntpdate-systemd = "ntpdate.service" - -SRC_URI += " \ - file://ntpdate.service \ - file://ntpd.service \ -" - -do_install_append() { - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ -} diff --git a/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p5.bbappend b/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p5.bbappend new file mode 100644 index 0000000..bc2b2dd --- /dev/null +++ b/meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p5.bbappend @@ -0,0 +1,20 @@ +inherit systemd + +PRINC := "${@int(PRINC) + 1}" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SYSTEMD_PACKAGES = "${PN}-systemd ${PN}-date-systemd" +SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service" +SYSTEMD_SERVICE_${PN}-date-systemd = "ntpdate.service" + +SRC_URI += " \ + file://ntpdate.service \ + file://ntpd.service \ +" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ +}
Change version of ntp to match that in meta-networking. Also change ntpdate to ntp-date to match the names used in meta-networking. Signed-off-by: Martin Ertsaas <martiert@gmail.com> --- .../recipes-support/ntp/ntp_4.2.6p3.bbappend | 20 -------------------- .../recipes-support/ntp/ntp_4.2.6p5.bbappend | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p3.bbappend create mode 100644 meta-systemd/meta-oe/recipes-support/ntp/ntp_4.2.6p5.bbappend