]> git.pld-linux.org Git - projects/geninitrd.git/blame - mod-scsi.sh
found some explanation of numeric root= params (used by lilo)
[projects/geninitrd.git] / mod-scsi.sh
CommitLineData
35043b20 1#!/bin/sh
c34c6a69 2SCSI_RCSID='$Revision$ $Date:: $'
05c474b5 3
35043b20
ER
4# geninitrd mod: scsi
5
6# it should be safe to remove scsi_mod from here, but I'm not sure...
7PRESCSIMODS="-scsi_mod unknown -sd_mod"
8
9# ???
10ide_only_root=${ide_only_root:-no}
11
12# allow forcing loading IDE modules, likely from sysconfig/geninitrd
13ADDIDE=${ADDIDE:-no}
14
15# return true if node is scsi device
16# @param string $node device node to be examined
17# @access public
18is_scsi() {
19 local node="$1"
20 if [ ! -e "$node" ]; then
21 warn "is_scsi(): node $node doesn't exist!"
22 return 1
23 fi
24
25 # TODO: more sophisticated check, not just pathname check
26 if is_yes "$(echo "$node" | awk '/^\/dev\/(sd|scsi)/ { print "yes"; }')"; then
27 return 0
28 fi
29
30 return 1
31}
32
33# find modules for $devpath
34# @param $devpath device to be examined
35# @access public
36find_modules_scsi() {
37 local devpath=$1
38
39 local n
40 for n in $PRESCSIMODS; do
41 if [ "X$n" = "Xunknown" ]; then
42 debug "Finding SCSI modules using scsi_hostadapter"
99e7251e 43 local mod scsimodules=$(modprobe_conf | awk '/scsi_hostadapter/ { print $3 }')
35043b20
ER
44 for mod in $scsimodules; do
45 # for now allow scsi modules to come from anywhere. There are some
46 # RAID controllers with drivers in block
47 find_module "$mod"
48 done
49 else
50 find_module "$n"
51 fi
52 done
53 find_module "-scsi_wait_scan"
54}
55
56
57# generate initrd fragment for ide device init
58# @access public
59initrd_gen_scsi() {
60 # nothing to do here
61 return 0
62}
This page took 0.083311 seconds and 4 git commands to generate.