use eval to allow command chains and report what we do
This commit is contained in:
parent
388077ca79
commit
d0a19fe8bd
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue