[216] in RedHat Linux List
Re: bug in /etc/rc.d/rc.sysinit?
daemon@ATHENA.MIT.EDU (Michael K. Johnson)
Mon Oct 21 18:41:15 1996
To: redhat-list@redhat.com
Cc: maillard@vt.edu
From: "Michael K. Johnson" <johnsonm@redhat.com>
In-reply-to: Your message of "Mon, 21 Oct 1996 09:53:28 EDT."
<199610211353.JAA00311@tulipe.val.org>
Date: Mon, 21 Oct 1996 15:09:24 -0400
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Julien Maillard writes:
>looking at /etc/rc.d/sysinit:
>- --
># If a SCSI tape has been detected, load the st module unconditionally
># since many SCSI tapes don't deal well with st being loaded and unloaded
>if cat /proc/scsi/scsi | grep -q 'Type: Sequential-Access' ; then
> if cat /proc/devices | grep -qv ' 9 st' ; then
> insmod st
> fi
>fi
>- --
>can i just add if [ -f /proc/scsi/scsi ]; then ... arround the above if?
Yes, but actually, I'd suggest something like this:
if cat /proc/scsi/scsi | grep 'Type: Sequential-Access' >/dev/null 2>&1 ; then
if cat /proc/devices | grep -qv ' 9 st' ; then
insmod st
fi
fi
That avoids an extra command invocation.
michaelkjohnson
"Ever wonder why the SAME PEOPLE make up ALL the conspiracy theories?"
--
PLEASE read the Red Hat FAQ, Tips, HOWTO and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-HOWTO
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null