From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/livecd-tools:bl2-only commit in: /
Date: Thu, 10 Feb 2011 23:57:54 +0000 (UTC) [thread overview]
Message-ID: <8d8fbc97a3d1485f0aa7e407e0d59eacd42ceef1.williamH@gentoo> (raw)
commit: 8d8fbc97a3d1485f0aa7e407e0d59eacd42ceef1
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 23:57:38 2011 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Feb 10 23:57:38 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=8d8fbc97
migrate yes/no tests to use if yesno
---
autoconfig | 35 +++++++++++++++++------------------
1 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/autoconfig b/autoconfig
index 0f5ea58..c05a3d1 100755
--- a/autoconfig
+++ b/autoconfig
@@ -226,7 +226,7 @@ check_svc() {
list_services() {
get_config
# Must not print anything here
- if [ "${DETECT}" = "yes" ]
+ if yesno "${DETECT}"
then
local arch="$(uname -m)"
@@ -402,14 +402,12 @@ start() {
echo "0" > /proc/sys/kernel/printk
get_config
- # DONE: BRLTTY migrated to depend
-
- if [ "${SPEAKUP}" = "yes" ]
+ if yesno "${SPEAKUP}"
then
modprobe ${SPEAKUP_MODULE} ${SPEAKUP_OPTIONS}
fi
- if [ "${DETECT}" = "yes" ]
+ if yesno "${DETECT}"
then
ebegin "Hardware detection started"
local numcpu="$(grep -c '^processor[[:space:]]\+:' /proc/cpuinfo)"
@@ -455,7 +453,7 @@ start() {
fi
# Now, we check if we are supposed to run a coldplug script.
- if [ "${COLDPLUG}" = "yes" ]
+ if yesno "${COLDPLUG}"
then
# Check whether we should be using hotplug/coldplug or whether we should
# just let udev do it all.
@@ -475,7 +473,7 @@ start() {
ewarn "Hotplug/Coldplug disabled via cmdline ..."
fi
- if [ "${APM}" = "yes" ]
+ if yesno "${APM}"
then
modprobe apm power_off=1 >/dev/null 2>&1 && \
einfo "APM BIOS found, power management functions enabled ..."
@@ -484,7 +482,7 @@ start() {
einfo "Not Loading APM Bios support ..."
fi
- if [ "${ACPI}" = "yes" ]
+ if yesno "${ACPI}"
then
modprobe processor >/dev/null 2>&1 && \
ebegin "ACPI power management functions enabled" && \
@@ -502,21 +500,21 @@ start() {
einfo "Not Loading ACPI support ..."
fi
- if [ "${IDEDMA}" = "yes" ]
+ if yesno "${IDEDMA}"
then
[ -x /etc/init.d/hdparm ] && /etc/init.d/hdparm start
else
ewarn "Disabling IDE DMA support ..."
fi
- if [ "${PCMCIA}" = "yes" ]
+ if yesno "${PCMCIA}"
then
[ -x /etc/init.d/pcmcia ] && /etc/init.d/pcmcia start
else
ewarn "PCMCIA disabled via cmdline ..."
fi
- if [ "${DHCP}" = "no" ]
+ if ! yesno "${DHCP}"
then
sed -i -e '/^ifconfig_eth.*dhcp.*/ s/^/#/' \
-e '/^iface_eth.*dhcp.*/ s/^/#/' \
@@ -548,7 +546,7 @@ start() {
then
for nics in ${NETDEVICES}
do
- if [ "${DHCP}" = "yes" ]
+ if yesno "${DHCP}"
then
einfo "Network device ${HILITE}${nics}${NORMAL} detected, DHCP broadcasting for IP ..."
if [ -f /var/run/dhcpcd-${nics}.pid ]
@@ -562,22 +560,22 @@ start() {
fi
fi
done
- if [ "${NFS}" = "yes" ]
+ if yesno "${NFS}"
then
[ -x /etc/init.d/portmap ] && /etc/init.d/portmap start
[ -x /etc/init.d/nfsmount ] && /etc/init.d/nfsmount start
fi
- if [ "${PASSWD}" = "no" ]
+ if ! yesno "${PASSWD}"
then
echo "root:${PASSWORD}" | chpasswd > /dev/null 2>&1
else
/etc/init.d/pwgen start
fi
- if [ "${SSHD}" = "yes" ]
+ if yesno "${SSHD}"
then
# If we have passwd= on the command line, we do not run pwgen and we
# set the root password to PASSWORD.
- if [ "${PASSWD}" = "yes" ]
+ if yesno "${PASSWD}"
then
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."
@@ -588,7 +586,7 @@ start() {
ewarn "No Network device auto detected ..."
fi
- if [ "${ALSA}" = "yes" ]
+ if yesno "${ALSA}"
then
if [ -n "${SOUND_FULLNAME}" -o -n "${SOUND_DRIVER}" ]
then
@@ -655,7 +653,8 @@ start() {
[ -n "${XDESC}" ] && einfo "VideoCard: ${HILITE}${XDESC}${NORMAL}"
- if [ "${X11}" = "no" ]
+ if ! yesno "${X11}"
+ then
touch /etc/.noxdm
fi
next reply other threads:[~2011-02-10 23:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 23:57 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-02-17 5:43 [gentoo-commits] proj/livecd-tools:bl2-only commit in: / William Hubbs
2011-02-13 19:27 William Hubbs
2011-02-12 22:15 William Hubbs
2011-02-12 20:04 William Hubbs
2011-02-12 7:19 William Hubbs
2011-02-12 6:32 William Hubbs
2011-02-12 5:33 William Hubbs
2011-02-12 4:33 William Hubbs
2011-02-12 2:17 William Hubbs
2011-02-12 0:45 William Hubbs
2011-02-11 23:45 William Hubbs
2011-02-11 22:34 William Hubbs
2011-02-11 22:27 William Hubbs
2011-02-11 22:18 William Hubbs
2011-02-11 21:14 William Hubbs
2011-02-11 21:07 Robin H. Johnson
2011-02-11 20:35 Robin H. Johnson
2011-02-11 20:21 William Hubbs
2011-02-11 17:43 William Hubbs
2011-02-11 4:22 William Hubbs
2011-02-11 0:26 William Hubbs
2011-02-11 0:06 Robin H. Johnson
2011-02-10 23:26 William Hubbs
2011-02-10 21:11 Robin H. Johnson
2011-02-10 21:11 Robin H. Johnson
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=8d8fbc97a3d1485f0aa7e407e0d59eacd42ceef1.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