summaryrefslogtreecommitdiff
path: root/modules.d/90dmraid
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2011-05-12 11:03:30 +0200
committerHarald Hoyer <harald@redhat.com>2011-05-12 11:06:47 +0200
commit29b10e65b12988db162b463ebee9c8ced56a7dbb (patch)
tree61c66a8df55c31adbc232ae735f032883f491ce6 /modules.d/90dmraid
parent982e78234c9c238821b9904646cb5fc169ed4036 (diff)
downloaddracut-29b10e65b12988db162b463ebee9c8ced56a7dbb.tar.gz
dracut-29b10e65b12988db162b463ebee9c8ced56a7dbb.tar.bz2
dracut-29b10e65b12988db162b463ebee9c8ced56a7dbb.zip
dracut-functions: make local vars local and prefix with "_"
Diffstat (limited to 'modules.d/90dmraid')
-rwxr-xr-xmodules.d/90dmraid/module-setup.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh
index bf41e9aa..fa208802 100755
--- a/modules.d/90dmraid/module-setup.sh
+++ b/modules.d/90dmraid/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ local _rootdev
# if we don't have dmraid installed on the host system, no point
# in trying to support it in the initramfs.
type -P dmraid >/dev/null || return 1
@@ -14,11 +15,11 @@ check() {
grep -q _raid_member; }
[[ $hostonly ]] && {
- rootdev=$(find_root_block_device)
- if [[ $rootdev ]]; then
+ _rootdev=$(find_root_block_device)
+ if [[ $_rootdev ]]; then
# root lives on a block device, so we can be more precise about
# hostonly checking
- check_block_and_slaves is_dmraid "$rootdev" || return 1
+ check_block_and_slaves is_dmraid "$_rootdev" || return 1
else
# root is not on a block device, use the shotgun approach
dmraid -r | grep -q ok || return 1
@@ -34,12 +35,13 @@ depends() {
}
install() {
+ local _i
dracut_install dmraid partx kpartx
inst dmeventd
- for i in {"$libdir","$usrlibdir"}/libdmraid-events*.so; do
- [ -e "$i" ] && dracut_install "$i"
+ for _i in {"$libdir","$usrlibdir"}/libdmraid-events*.so; do
+ [ -e "$_i" ] && dracut_install "$_i"
done
inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules