Subversion Repositories configs

Rev

Rev 4 | Rev 42 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 19
Line 167... Line 167...
167
   # modprobe might be old and not understand the -R option, or
167
   # modprobe might be old and not understand the -R option, or
168
   # there might not be an alias. In both cases we assume
168
   # there might not be an alias. In both cases we assume
169
   # that the module is not upstreamed.
169
   # that the module is not upstreamed.
170
   mod=$1
170
   mod=$1
171
   mod_alias=$2
171
   mod_alias=$2
-
 
172
   alias_file="/lib/modules/$(uname -r)/modules.alias"
172
 
173
 
173
   modname=$(/sbin/modprobe -R ${mod_alias} 2>/dev/null)
174
   modname=$(/sbin/modprobe -R ${mod_alias} 2>/dev/null)
174
   if [ $? = 0 -a "$modname" != "" ] ; then
175
   if [ $? = 0 -a "$modname" != "" ] ; then
175
	echo $modname
176
	echo $modname
-
 
177
   elif grep -F ${mod_alias} ${alias_file} >/dev/null 2>&1 ; then
-
 
178
	echo $(grep -F ${mod_alias} ${alias_file} | awk '{print $3}')
176
   else
179
   else
177
	echo $mod
180
	echo $mod
178
   fi
181
   fi
179
}
182
}
180
 
183