use eval to allow command chains and report what we do
This commit is contained in:
parent
388077ca79
commit
d0a19fe8bd
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Nico Schottelius
|
# Nico Schottelius
|
||||||
# Script to test if a module can be reloaded
|
# Script to test if a module can be reloaded
|
||||||
|
# usage: <module> <cmd>
|
||||||
|
# example: iwlagn "sleep 0.2"
|
||||||
|
|
||||||
mod="$1"; shift
|
mod="$1"; shift
|
||||||
cmd="$1"; shift
|
cmd="$1"; shift
|
||||||
|
@ -13,7 +15,7 @@ while true; do
|
||||||
else
|
else
|
||||||
modprobe -v "$mod"
|
modprobe -v "$mod"
|
||||||
fi
|
fi
|
||||||
|
echo "Calling $cmd ..."
|
||||||
$cmd
|
eval $cmd
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue