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 1QGMkq-0007zs-Er for garchives@archives.gentoo.org; Sun, 01 May 2011 02:51:28 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 997C31C08F; Sun, 1 May 2011 02:49:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5025E1C077 for ; Sun, 1 May 2011 02:49:13 +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 DB10E2AC018 for ; Sun, 1 May 2011 02:49:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 4A57480508 for ; Sun, 1 May 2011 02:49:12 +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: <5bdfa8ccc47ac834adab356dc0d8dfb184ff1e59.williamH@gentoo> Subject: [gentoo-commits] proj/livecd-tools:master commit in: init.d/ X-VCS-Repository: proj/livecd-tools X-VCS-Files: init.d/autoconfig init.d/firmware init.d/hwsetup X-VCS-Directories: init.d/ X-VCS-Committer: williamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 5bdfa8ccc47ac834adab356dc0d8dfb184ff1e59 Date: Sun, 1 May 2011 02:49:12 +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: af6592e537368252140d34c4336cfd88 commit: 5bdfa8ccc47ac834adab356dc0d8dfb184ff1e59 Author: William Hubbs gentoo org> AuthorDate: Tue Feb 15 22:50:09 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Sun May 1 02:46:14 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/livecd-tools.= git;a=3Dcommit;h=3D5bdfa8cc split out firmware extraction and hwsetup Firmware extraction and hwsetup are now separate services. --- init.d/autoconfig | 30 +++++------------------------- init.d/firmware | 22 ++++++++++++++++++++++ init.d/hwsetup | 14 ++++++++++++++ 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/init.d/autoconfig b/init.d/autoconfig index 55fbcfd..e2655a6 100755 --- a/init.d/autoconfig +++ b/init.d/autoconfig @@ -272,6 +272,10 @@ list_services() { svcs=3D"${svcs} $(check_svc ${APM} apmd)" svcs=3D"${svcs} $(check_svc ${BRLTTY} brltty)" svcs=3D"${svcs} $(check_svc ${COLDPLUG} coldplug hotplug)" + if yesno "$COLDPLUG" && ! rc-service -e coldplug && ! rc-service -e hot= plug + then + echo firmware hwsetup + fi svcs=3D"${svcs} $(check_svc ${GPM} gpm-pre)" svcs=3D"${svcs} $(check_svc ${GPM} gpm)" svcs=3D"${svcs} $(check_svc ${IDEDMA} hdparm)" @@ -287,17 +291,6 @@ list_services() { echo ${svcs} } =20 -unpack_firmware() { - # This unpacks any firmware tarballs. - if [ -e /lib/firmware.tar.bz2 ] - then - ebegin "Unpacking firmware" - mkdir -p /lib/firmware - tar xjf /lib/firmware.tar.bz2 -C /lib/firmware - eend 0 - fi -} - get_info() { local tmp =20 @@ -460,21 +453,8 @@ start() { ewarn "Hardware detection disabled via cmdline ..." fi =20 - # Now, we check if we are supposed to run a coldplug script. - if yesno "${COLDPLUG}" + if ! yesno "${COLDPLUG}" then - # Check whether we should be using hotplug/coldplug or whether we shou= ld - # just let udev do it all. - # coldplug+hotplug would already be up due to list_services - if ! rc-service -e coldplug && ! rc-service -e hotplug - then - # TODO: This needs to go to a seperate script, so that hwsetup can de= pend on it. - unpack_firmware - [ -x /sbin/udevtrigger ] && /sbin/udevtrigger - fi - [ -e /etc/sysconfig ] || mkdir -p /etc/sysconfig - [ -x /usr/sbin/hwsetup ] && hwsetup - else ewarn "Hotplug/Coldplug disabled via cmdline ..." fi =20 diff --git a/init.d/firmware b/init.d/firmware new file mode 100755 index 0000000..d65d601 --- /dev/null +++ b/init.d/firmware @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# This unpacks any firmware tarballs. + +depend() { + : +} + +start() { +einfo checking for firmware to unpack + if [ -e /lib/firmware.tar.bz2 ] + then + ebegin "Unpacking firmware" + mkdir -p /lib/firmware + tar xjf /lib/firmware.tar.bz2 -C /lib/firmware + eend 0 + fi + [ -x /sbin/udevtrigger ] && /sbin/udevtrigger +} diff --git a/init.d/hwsetup b/init.d/hwsetup new file mode 100755 index 0000000..aac4db5 --- /dev/null +++ b/init.d/hwsetup @@ -0,0 +1,14 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need firmware +} + +start() { + einfo starting hwsetup + [ -e /etc/sysconfig ] || mkdir -p /etc/sysconfig + [ -x /usr/sbin/hwsetup ] && hwsetup +}