public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/livecd-tools:master commit in: /
Date: Sun,  1 May 2011 02:49:06 +0000 (UTC)	[thread overview]
Message-ID: <7d544b9efa9b4c722ce30e2c476986ac60b3f706.williamH@gentoo> (raw)

commit:     7d544b9efa9b4c722ce30e2c476986ac60b3f706
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 04:20:51 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May  1 02:46:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=7d544b9e

use "rc-service -i" to test for and start services

With openrc, we can use "rc-service -i foo start" to test for the existance 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=1 >/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() {
 
 	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
 
 	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() {
 
 			einfo "${sndmsg}"
 
-			if [ -x /etc/init.d/alsasound ]
-			then
-				/etc/init.d/alsasound start
-			fi
+			rc-service -i alsasound start
 
 			if [ -e /proc/asound/cards ]
 			then
@@ -640,7 +637,7 @@ start() {
 
 				if [ "${SPEAKUP_MODULE}" = "speakup_soft" ]
 				then
-					[ -x /etc/init.d/espeakup ] && /etc/init.d/espeakup start
+					rc-service -i espeakup start
 				fi
 			fi
 		fi



             reply	other threads:[~2011-05-01  2:50 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 --
2019-09-26 17:07 [gentoo-commits] proj/livecd-tools:master commit in: / Rick Farina
2017-03-07 15:35 Brian Evans
2017-02-25  0:54 Robin H. Johnson
2017-01-10 21:54 Brian Evans
2015-10-18  2:26 William Hubbs
2015-10-18  1:45 Jorge Manuel B. S. Vicetto
2015-02-22 22:35 William Hubbs
2015-01-14 18:33 William Hubbs
2015-01-14  2:55 Jorge Manuel B. S. Vicetto
2013-07-07 22:48 William Hubbs
2013-07-07 22:28 William Hubbs
2013-07-06 23:53 William Hubbs
2013-02-25 18:20 William Hubbs
2013-02-25 17:48 William Hubbs
2013-02-25 17:48 William Hubbs
2011-06-30 20:31 William Hubbs
2011-06-28 19:56 William Hubbs
2011-06-28 17:32 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
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
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
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-05-01  2:49 William Hubbs
2011-02-17  5:38 William Hubbs
2011-02-10 21:30 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=7d544b9efa9b4c722ce30e2c476986ac60b3f706.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