Skip to content

Commit

Permalink
Make loop variables local
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Allison <[email protected]>

Closes: #170
Approved by: rhvgoyal
  • Loading branch information
root authored and rh-atomic-bot committed Nov 15, 2016
1 parent c9faba1 commit 1540c9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Tests if the volume group vg_name exists
vg_exists() {
local vg_name="$1"
local vg vg_name="$1"

for vg in $(vgs --noheadings -o vg_name); do
if [ "$vg" == "$vg_name" ]; then
Expand All @@ -19,15 +19,15 @@ clean_config_files() {
}

remove_pvs() {
local devs=$1
local dev devs=$1
# Assume $dev1 is pv to remove.
for dev in $devs; do
pvremove -y ${dev}1 >> $LOGS 2>&1
done
}

remove_partitions() {
local devs=$1
local dev devs=$1

# Assume partition number 1 is to be removed.
for dev in $devs; do
Expand All @@ -37,7 +37,7 @@ remove_partitions() {

# Wipe all signatures on devices
wipe_signatures() {
local devs=$1
local dev devs=$1
for dev in $devs; do
wipefs -a $dev >> $LOGS 2>&1
done
Expand Down

0 comments on commit 1540c9c

Please sign in to comment.