From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/livecd-tools:master commit in: init.d/
Date: Sun, 1 May 2011 02:49:12 +0000 (UTC) [thread overview]
Message-ID: <5bdfa8ccc47ac834adab356dc0d8dfb184ff1e59.williamH@gentoo> (raw)
commit: 5bdfa8ccc47ac834adab356dc0d8dfb184ff1e59
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 15 22:50:09 2011 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May 1 02:46:14 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=5bdfa8cc
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="${svcs} $(check_svc ${APM} apmd)"
svcs="${svcs} $(check_svc ${BRLTTY} brltty)"
svcs="${svcs} $(check_svc ${COLDPLUG} coldplug hotplug)"
+ if yesno "$COLDPLUG" && ! rc-service -e coldplug && ! rc-service -e hotplug
+ then
+ echo firmware hwsetup
+ fi
svcs="${svcs} $(check_svc ${GPM} gpm-pre)"
svcs="${svcs} $(check_svc ${GPM} gpm)"
svcs="${svcs} $(check_svc ${IDEDMA} hdparm)"
@@ -287,17 +291,6 @@ list_services() {
echo ${svcs}
}
-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
@@ -460,21 +453,8 @@ start() {
ewarn "Hardware detection disabled via cmdline ..."
fi
- # 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 should
- # 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 depend 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
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
+}
next reply other threads:[~2011-05-01 2:51 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-01 2:49 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-27 16:57 [gentoo-commits] proj/livecd-tools:master commit in: init.d/ Ben Kohler
2021-07-29 4:05 Georgy Yakovlev
2021-02-25 23:12 Ben Kohler
2020-11-06 0:58 Matt Turner
2020-11-06 0:29 Matt Turner
2020-11-05 23:49 Matt Turner
2020-11-05 23:49 Matt Turner
2020-11-05 23:49 Matt Turner
2020-04-23 18:08 Rick Farina
2019-09-20 19:32 Matt Turner
2019-09-20 19:32 Matt Turner
2018-09-14 5:27 Matt Turner
2018-08-24 14:57 Richard Farina
2018-03-16 1:07 Richard Farina
2018-03-15 18:49 Richard Farina
2018-03-15 17:07 Richard Farina
2018-03-15 4:34 William Hubbs
2018-03-15 3:51 Richard Farina
2017-08-28 18:43 Richard Farina
2017-02-25 0:50 Robin H. Johnson
2016-07-09 4:27 William Hubbs
2015-12-11 17:53 William Hubbs
2015-12-11 17:53 William Hubbs
2015-11-01 20:44 Richard Farina
2014-05-22 16:30 Richard Farina
2013-07-05 21:55 William Hubbs
2013-07-05 21:46 William Hubbs
2013-01-03 18:20 William Hubbs
2012-10-03 14:17 William Hubbs
2011-10-25 2:37 William Hubbs
2011-09-19 1:41 Jorge Manuel B. S. Vicetto
2011-06-30 20:29 William Hubbs
2011-06-30 20:12 William Hubbs
2011-06-28 5:22 William Hubbs
2011-06-28 5:18 William Hubbs
2011-06-28 5:13 William Hubbs
2011-05-01 3:49 William Hubbs
2011-05-01 2:49 William Hubbs
2011-05-01 2:49 William Hubbs
2011-05-01 2:49 William Hubbs
2011-05-01 2:49 William Hubbs
2011-05-01 2:49 William Hubbs
2011-05-01 2:49 William Hubbs
2011-05-01 2:49 William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5bdfa8ccc47ac834adab356dc0d8dfb184ff1e59.williamH@gentoo \
--to=williamh@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox