Re: Simple Shell Script
- From: Bit Twister <BitTwister@xxxxxxxxxxxxxxxx>
- Date: Mon, 26 Feb 2007 22:49:51 -0600
On Tue, 27 Feb 2007 13:39:47 +0900, Dan N wrote:
I need a script to insmod a module if lsmod doesn't list it. How would I
go about doing that? I know it would be pretty simple.
You might want to read http://tldp.org/LDP/abs/html/index.html and do a
man grep
man test
----- starter script follows --------------------
_count=$(grep -c mod_name_here lsmod)
if [ $_count -eq 0 ] ; then
(your insmod command here)
if [ $? -ne 0 ] ; then
mail -s "insmod whatever failed" dan@xxxxxxxxxxxxxxxxxxx < /dev/null
fi
fi
.
- Follow-Ups:
- Re: Simple Shell Script
- From: Dan N
- Re: Simple Shell Script
- References:
- Simple Shell Script
- From: Dan N
- Simple Shell Script
- Prev by Date: Simple Shell Script
- Next by Date: Re: Simple Shell Script
- Previous by thread: Simple Shell Script
- Next by thread: Re: Simple Shell Script
- Index(es):
Relevant Pages
|