summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Węgliński <cla@gentoo.org>2009-11-16 14:28:14 +0000
committerDawid Węgliński <cla@gentoo.org>2009-11-16 14:28:14 +0000
commit3721a5c29afec6543891534dbd86ec17d881b057 (patch)
tree91b73ad49e1eafcf1f5e3e496a6596ea85a5478d
parentVersion bumped. (diff)
downloadgentoo-2-3721a5c29afec6543891534dbd86ec17d881b057.tar.gz
gentoo-2-3721a5c29afec6543891534dbd86ec17d881b057.tar.bz2
gentoo-2-3721a5c29afec6543891534dbd86ec17d881b057.zip
Don't run grep in global scope of init script (bug #279477)
(Portage version: 2.2_rc49/cvs/Linux x86_64)
-rw-r--r--net-misc/chrony/ChangeLog6
-rw-r--r--net-misc/chrony/files/chronyd.conf6
-rw-r--r--net-misc/chrony/files/chronyd.rc7
3 files changed, 11 insertions, 8 deletions
diff --git a/net-misc/chrony/ChangeLog b/net-misc/chrony/ChangeLog
index 5c1b9dad8fcf..0c380e0d3455 100644
--- a/net-misc/chrony/ChangeLog
+++ b/net-misc/chrony/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/chrony
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.46 2009/10/26 07:47:26 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.47 2009/11/16 14:28:14 cla Exp $
+
+ 16 Nov 2009; Dawid Węgliński <cla@gentoo.org> files/chronyd.conf,
+ files/chronyd.rc:
+ Don't run grep in global scope (bug #279477)
26 Oct 2009; Torsten Veller <tove@gentoo.org> chrony-1.23.ebuild:
Update HOMEPAGE
diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf
index 560825c2c82b..fc43a95c40fe 100644
--- a/net-misc/chrony/files/chronyd.conf
+++ b/net-misc/chrony/files/chronyd.conf
@@ -10,9 +10,3 @@ CFGFILE="/etc/chrony/chrony.conf"
# the gain or loss rate across system reboots and shutdowns.
ARGS=""
-
-# devfs creates the device for RTC if it's compiled into kernel
-test -c /dev/rtc && {
- grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
-}
-grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"
diff --git a/net-misc/chrony/files/chronyd.rc b/net-misc/chrony/files/chronyd.rc
index 49d7526bb587..c6b28a488d6b 100644
--- a/net-misc/chrony/files/chronyd.rc
+++ b/net-misc/chrony/files/chronyd.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.8 2007/03/22 14:32:09 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.9 2009/11/16 14:28:14 cla Exp $
depend() {
need net
@@ -30,6 +30,11 @@ checkconfig() {
# know if it might be handy
PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`
fi
+
+ if [ -c /dev/rtc ]; then
+ grep -q 'rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
+ fi
+ grep -q 'dumponexit' "${CFGFILE}" && ARGS="${ARGS} -r"
return 0
}