diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-02-16 01:56:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-02-16 01:56:32 +0000 |
commit | f267d433ab86364146d273037fb0f4bb75356fe5 (patch) | |
tree | 5d254920883fcc5725a9b4e2b716302cd1ef1eff /net-misc/ntp | |
parent | Marked stable on sparc to fix dev-ruby/fxruby's broken deps. (Manifest recommit) (diff) | |
download | gentoo-2-f267d433ab86364146d273037fb0f4bb75356fe5.tar.gz gentoo-2-f267d433ab86364146d273037fb0f4bb75356fe5.tar.bz2 gentoo-2-f267d433ab86364146d273037fb0f4bb75356fe5.zip |
fix drop root logic and touch up the ntp-client script #41610
Diffstat (limited to 'net-misc/ntp')
-rw-r--r-- | net-misc/ntp/files/ntp-client-4.1.2.rc | 32 | ||||
-rw-r--r-- | net-misc/ntp/files/ntp-client.rc | 4 | ||||
-rw-r--r-- | net-misc/ntp/ntp-4.1.2.ebuild | 4 | ||||
-rw-r--r-- | net-misc/ntp/ntp-4.2.0.ebuild | 11 |
4 files changed, 43 insertions, 8 deletions
diff --git a/net-misc/ntp/files/ntp-client-4.1.2.rc b/net-misc/ntp/files/ntp-client-4.1.2.rc new file mode 100644 index 000000000000..ba5eb15e2b88 --- /dev/null +++ b/net-misc/ntp/files/ntp-client-4.1.2.rc @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client-4.1.2.rc,v 1.1 2004/02/16 01:56:32 vapier Exp $ + +depend() { + before cron + need net + use dns logger +} + +checkconfig() { + if [ ! -x "`which ${NTPCLIENT_CMD} 2>/dev/null`" ] ; then + eerror "Please edit /etc/conf.d/ntp-client" + eerror "Unable to locate the client command ${NTPCLIENT_CMD}!" + return 1 + fi + if [ -z "${NTPCLIENT_OPTS}" ] ; then + eerror "Please edit /etc/conf.d/ntp-client" + eerror "I need to know what server/options to use!" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + + ebegin "Setting clock via the ntp client '${NTPCLIENT_CMD}'" + ${NTPCLIENT_CMD} >/dev/null ${NTPCLIENT_OPTS} + eend $? "Failed to set clock" +} diff --git a/net-misc/ntp/files/ntp-client.rc b/net-misc/ntp/files/ntp-client.rc index e78977acf4de..56bf13f1834e 100644 --- a/net-misc/ntp/files/ntp-client.rc +++ b/net-misc/ntp/files/ntp-client.rc @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.3 2003/10/30 06:18:48 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.4 2004/02/16 01:56:32 vapier Exp $ depend() { before cron @@ -27,6 +27,6 @@ start() { checkconfig || return $? ebegin "Setting clock via the ntp client '${NTPCLIENT_CMD}'" - ${NTPCLIENT_CMD} >/dev/null ${NTPCLIENT_OPTS} + ${NTPCLIENT_CMD} -Q ${NTPCLIENT_OPTS} >/dev/null eend $? "Failed to set clock" } diff --git a/net-misc/ntp/ntp-4.1.2.ebuild b/net-misc/ntp/ntp-4.1.2.ebuild index 8e6b2200b019..d94c534124f4 100644 --- a/net-misc/ntp/ntp-4.1.2.ebuild +++ b/net-misc/ntp/ntp-4.1.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.1.2.ebuild,v 1.29 2004/02/15 17:24:35 weeve Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.1.2.ebuild,v 1.30 2004/02/16 01:56:32 vapier Exp $ inherit eutils @@ -102,7 +102,7 @@ src_install() { [ ! -e /etc/ntp.conf ] && insinto /etc && doins ${FILESDIR}/ntp.conf exeinto /etc/init.d newexe ${FILESDIR}/ntpd-${PV}.rc ntpd - newexe ${FILESDIR}/ntp-client.rc ntp-client + newexe ${FILESDIR}/ntp-client-${PV}.rc ntp-client insinto /etc/conf.d newins ${FILESDIR}/ntpd-${PV}.confd ntpd newins ${FILESDIR}/ntp-client.confd ntp-client diff --git a/net-misc/ntp/ntp-4.2.0.ebuild b/net-misc/ntp/ntp-4.2.0.ebuild index d3070b7989f5..dda9be3bf8f8 100644 --- a/net-misc/ntp/ntp-4.2.0.ebuild +++ b/net-misc/ntp/ntp-4.2.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.0.ebuild,v 1.4 2004/02/15 01:51:32 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.0.ebuild,v 1.5 2004/02/16 01:56:32 vapier Exp $ inherit eutils @@ -12,11 +12,11 @@ SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/${P}.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64" -IUSE="parse-clocks droproot selinux ssl" +IUSE="parse-clocks nodroproot selinux ssl" RDEPEND=">=sys-libs/ncurses-5.2 >=sys-libs/readline-4.1 - droproot? ( sys-libs/libcap ) + !nodroproot? ( sys-libs/libcap ) ssl? ( dev-libs/openssl ) selinux? ( sec-policy/selinux-ntp )" DEPEND="${RDEPEND} @@ -58,6 +58,8 @@ src_unpack() { aclocal -I . || die "aclocal" automake || die "automake" autoconf || die "autoconf" + + sed -i 's:-lelf:-la_doe_a_deer_a_female_deer:g' configure } src_compile() { @@ -71,7 +73,7 @@ src_compile() { || mysslconf="--with-openssl-libdir=no" econf \ --build=${CHOST} \ - `use_enable droproot linuxcaps` \ + `use_enable !nodroproot linuxcaps` \ `use_enable clockctl` \ ${mysslconf} \ || die @@ -107,6 +109,7 @@ src_install() { insinto /etc/conf.d newins ${FILESDIR}/ntpd.confd ntpd newins ${FILESDIR}/ntp-client.confd ntp-client + use nodroproot && dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd dodir /var/lib/ntp fowners ntp:ntp /var/lib/ntp |