From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:0.21.x commit in: init.d/
Date: Thu, 25 Aug 2016 22:03:06 +0000 (UTC) [thread overview]
Message-ID: <1472162326.c8059c8474cb0aeb6f7f89f7200f5faa73f9a66e.williamh@OpenRC> (raw)
commit: c8059c8474cb0aeb6f7f89f7200f5faa73f9a66e
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Aug 25 21:10:45 2016 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Aug 25 21:58:46 2016 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=c8059c84
modules-load.d: cleanups
Move list of directories to a local variable and create the fn variable
to use for an individual file name rather than using path.
init.d/modules-load.in | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/init.d/modules-load.in b/init.d/modules-load.in
index 8c19a36..0f80396 100644
--- a/init.d/modules-load.in
+++ b/init.d/modules-load.in
@@ -16,12 +16,11 @@ depend()
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
}
-modules_dirs="/usr/lib/modules-load.d /run/modules-load.d /etc/modules-load.d"
-
find_modfiles()
{
- local basenames files x y
- for x in $modules_dirs; do
+ local dirs="/usr/lib/modules-load.d /run/modules-load.d /etc/modules-load.d"
+ local basenames files fn x y
+ for x in $dirs; do
[ ! -d $x ] && continue
for y in $x/*.conf; do
[ -f $y ] && basenames="${basenames}\n${y##*/}"
@@ -29,11 +28,11 @@ find_modfiles()
done
basenames=$(printf "$basenames" | sort -u)
for x in $basenames; do
- for y in $modules_dirs; do
+ for y in $dirs; do
[ -r $y/$x ] &&
- path=$y/$x
+ fn=$y/$x
done
- files="$files $path"
+ files="$files $fn"
done
echo $files
}
next reply other threads:[~2016-08-25 22:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 22:03 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-08-31 13:47 [gentoo-commits] proj/openrc:0.21.x commit in: init.d/ William Hubbs
2016-08-30 14:09 William Hubbs
2016-08-25 22:03 William Hubbs
2016-08-25 22:03 William Hubbs
2016-07-31 19:06 William Hubbs
2016-07-06 17:35 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=1472162326.c8059c8474cb0aeb6f7f89f7200f5faa73f9a66e.williamh@OpenRC \
--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