summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Westerhof <mwester@dls.net>2009-02-19 23:20:04 -0600
committerMike Westerhof <mwester@dls.net>2009-02-19 23:20:04 -0600
commit4f451e61c74994b7be43ad6ff616ae5ae7ce919a (patch)
tree195584c09324e5dd21fbc7268e0f6168daae7aa1
parent6b2e57707da3960edc36296a7f63411f4617751d (diff)
downloadopenembedded-4f451e61c74994b7be43ad6ff616ae5ae7ce919a.tar.gz
ntpclient: use update-alternatives for adjtimex
-rw-r--r--packages/ntpclient/ntpclient_2007_365.bb11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/ntpclient/ntpclient_2007_365.bb b/packages/ntpclient/ntpclient_2007_365.bb
index b892f384e7..89f5967d3f 100644
--- a/packages/ntpclient/ntpclient_2007_365.bb
+++ b/packages/ntpclient/ntpclient_2007_365.bb
@@ -4,7 +4,7 @@ AUTHOR = "Larry Doolittle <larry@doolittle.boa.org>"
RDEPENDS = "busybox"
SECTION = "admin"
LICENSE = "GPLv2"
-PR = "r0"
+PR = "r1"
# The ntpclient package uses version numbers that include an underscore :(
PV = "2007_365"
# ntpclient unpacks into a directory that doesn't include version info :(
@@ -27,8 +27,15 @@ do_compile() {
do_install () {
# Install the binary and tools
install -D -m 0755 ${S}/ntpclient ${D}${base_sbindir}/ntpclient
- install -D -m 0755 ${S}/adjtimex ${D}${base_sbindir}/adjtimex
+ install -D -m 0755 ${S}/adjtimex ${D}${base_sbindir}/adjtimex.${PN}
install -D -m 0755 ${S}/rate.awk ${D}${sbindir}/ntpclient-drift-rate.awk
install -D -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ntpclient
}
+pkg_postinst_${PN} () {
+ update-alternatives --install ${sbindir}/adjtimex adjtimex adjtimex.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove adjtimex adjtimex.${PN}
+}