use eval to allow command chains and report what we do

This commit is contained in:
Nico Schottelius 2009-03-12 16:12:37 +01:00
parent 388077ca79
commit d0a19fe8bd
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
#!/bin/sh
# Nico Schottelius
# Script to test if a module can be reloaded
# usage: <module> <cmd>
# example: iwlagn "sleep 0.2"
mod="$1"; shift
cmd="$1"; shift
@ -13,7 +15,7 @@ while true; do
else
modprobe -v "$mod"
fi
$cmd
echo "Calling $cmd ..."
eval $cmd
done