From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PnkXC-0001EV-0Y for garchives@archives.gentoo.org; Fri, 11 Feb 2011 04:23:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE2C4E08A2; Fri, 11 Feb 2011 04:22:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8A491E08A2 for ; Fri, 11 Feb 2011 04:22:57 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E5B071B40B0 for ; Fri, 11 Feb 2011 04:22:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 53ACE8006A for ; Fri, 11 Feb 2011 04:22:56 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <7c30187d5795b90e9af37a88c8b5d787cdfa0389.williamH@gentoo> Subject: [gentoo-commits] proj/livecd-tools:bl2-only commit in: / X-VCS-Repository: proj/livecd-tools X-VCS-Files: autoconfig X-VCS-Directories: / X-VCS-Committer: williamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 7c30187d5795b90e9af37a88c8b5d787cdfa0389 Date: Fri, 11 Feb 2011 04:22:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 03189334f2a6bc6a08095ff06c154a93 commit: 7c30187d5795b90e9af37a88c8b5d787cdfa0389 Author: William Hubbs gentoo org> AuthorDate: Fri Feb 11 04:20:51 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Fri Feb 11 04:20:51 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/livecd-tools.= git;a=3Dcommit;h=3D7c30187d use "rc-service -i" to test for and start services With openrc, we can use "rc-service -i foo start" to test for the existan= ce of service foo and start it if it does exist. --- autoconfig | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/autoconfig b/autoconfig index cdcb89c..d8df734 100755 --- a/autoconfig +++ b/autoconfig @@ -474,7 +474,7 @@ start() { then modprobe apm power_off=3D1 >/dev/null 2>&1 && \ einfo "APM BIOS found, power management functions enabled ..." - [ -x /etc/init.d/apmd ] && /etc/init.d/apmd start + rc-service -i apmd start else einfo "Not Loading APM Bios support ..." fi @@ -491,7 +491,7 @@ start() { modprobe thermal >/dev/null 2>&1 modprobe video >/dev/null 2>&1 modprobe dock >/dev/null 2>&1 - [ -x /etc/init.d/acpid ] && /etc/init.d/acpid start + rc-service -i acpid start eend else einfo "Not Loading ACPI support ..." @@ -499,14 +499,14 @@ start() { =20 if yesno "${IDEDMA}" then - [ -x /etc/init.d/hdparm ] && /etc/init.d/hdparm start + rc-service -i hdparm start else ewarn "Disabling IDE DMA support ..." fi =20 if yesno "${PCMCIA}" then - [ -x /etc/init.d/pcmcia ] && /etc/init.d/pcmcia start + rc-service -i pcmcia start else ewarn "PCMCIA disabled via cmdline ..." fi @@ -559,14 +559,14 @@ start() { done if yesno "${NFS}" then - [ -x /etc/init.d/portmap ] && /etc/init.d/portmap start - [ -x /etc/init.d/nfsmount ] && /etc/init.d/nfsmount start + rc-service -i portmap start + rc-service -i nfsmount start fi if ! yesno "${PASSWD}" then echo "root:${PASSWORD}" | chpasswd > /dev/null 2>&1 else - /etc/init.d/pwgen start + rc-service pwgen start fi if yesno "${SSHD}" then @@ -577,7 +577,7 @@ start() { ewarn "WARNING: You are starting sshd with a scrambled root password= !!!" ewarn "WARNING: You need to set a root password to be able to login = remotely." fi - [ -x /etc/init.d/sshd ] && /etc/init.d/sshd start + rc-service -i sshd start fi else ewarn "No Network device auto detected ..." @@ -596,10 +596,7 @@ start() { =20 einfo "${sndmsg}" =20 - if [ -x /etc/init.d/alsasound ] - then - /etc/init.d/alsasound start - fi + rc-service -i alsasound start =20 if [ -e /proc/asound/cards ] then @@ -640,7 +637,7 @@ start() { =20 if [ "${SPEAKUP_MODULE}" =3D "speakup_soft" ] then - [ -x /etc/init.d/espeakup ] && /etc/init.d/espeakup start + rc-service -i espeakup start fi fi fi