X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by lists.alpinelinux.org (Postfix) with ESMTP id D4B04360F67C for ; Thu, 28 Apr 2011 07:26:34 +0000 (UTC) Received: by wyf23 with SMTP id 23so2399662wyf.13 for ; Thu, 28 Apr 2011 00:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=kA81PtvdkkUdRai5xsNlSgliislFbxbJFQHb2L6ka3Y=; b=mu/ahmg14spumQ1oBtG0b+3j4Viyzcsj2AYwQ/67pvtbLitBt2PVduqEeLT2B3o+C+ KtUtFNPLJ5phVQUa0HFVlsqP4qtYkls8NJMwIjdV8I8U+V7ZyYtPwn+eufsIDCNw4kT/ NsOo76JZ9cQsbqvYgpW1HXhnNdosReItJWYk4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=oIV07cC4KyYeXsQt6LFS145t1+NZlfPSKKMKmlcSWC06jXkZahycJgu3iI1524zAIM vOT+ZSGtWzdu2ql62SmEnKgnk9I1fvKMigLaJiQE4zM5taGh9jOQ5FzIGqgRf7/G4RJ0 7nPpb4vAmfswrJ7EZ31I1AWIlwUD9K1kvfccM= Received: by 10.216.54.134 with SMTP id i6mr2976710wec.75.1303975592398; Thu, 28 Apr 2011 00:26:32 -0700 (PDT) Received: from localhost.localdomain ([196.35.155.75]) by mx.google.com with ESMTPS id g32sm705569wej.27.2011.04.28.00.26.29 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2011 00:26:32 -0700 (PDT) From: Duane Hughes To: alpine-devel@lists.alpinelinux.org Cc: Duane Hughes Subject: [alpine-devel] [PATCH] main/chrony: updated with latest initd and confd from gentoo Date: Thu, 28 Apr 2011 07:26:12 +0000 Message-Id: <1303975572-1336-1-git-send-email-duanejevon@gmail.com> X-Mailer: git-send-email 1.7.4.5 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: fixes #603 --- main/chrony/chronyd.confd | 6 ------ main/chrony/chronyd.initd | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/main/chrony/chronyd.confd b/main/chrony/chronyd.confd index 560825c..fc43a95 100644 --- a/main/chrony/chronyd.confd +++ b/main/chrony/chronyd.confd @@ -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/main/chrony/chronyd.initd b/main/chrony/chronyd.initd index bf19f31..4fe5135 100644 --- a/main/chrony/chronyd.initd +++ b/main/chrony/chronyd.initd @@ -35,8 +35,17 @@ checkconfig() { return 0 } +setxtrarg() { + if [ -c /dev/rtc ]; then + grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s" + fi + grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r" + return 0 +} + start() { checkconfig || return $? + setxtrarg [ -n "${PIDFILE}" ] || PIDFILE=/var/run/chronyd.pid -- 1.7.4.5 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---