summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johanson <latexer@gentoo.org>2004-02-04 22:35:40 +0000
committerPeter Johanson <latexer@gentoo.org>2004-02-04 22:35:40 +0000
commita13245ae571fb2a06f57d793f60d1aa4ca9a2ab0 (patch)
tree749e87b8b11d403ba7d3482e09c820448af8f021 /sys-apps/pcmcia-cs/files
parentAdded alternative PCIC module attempt in init script for more flexibility (diff)
downloadhistorical-a13245ae571fb2a06f57d793f60d1aa4ca9a2ab0.tar.gz
historical-a13245ae571fb2a06f57d793f60d1aa4ca9a2ab0.tar.bz2
historical-a13245ae571fb2a06f57d793f60d1aa4ca9a2ab0.zip
Added alternative PCIC module attempt in init script for more flexibility
Diffstat (limited to 'sys-apps/pcmcia-cs/files')
-rw-r--r--sys-apps/pcmcia-cs/files/pcmcia.rc24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys-apps/pcmcia-cs/files/pcmcia.rc b/sys-apps/pcmcia-cs/files/pcmcia.rc
index 703c8e9d060b..5078225e15ba 100644
--- a/sys-apps/pcmcia-cs/files/pcmcia.rc
+++ b/sys-apps/pcmcia-cs/files/pcmcia.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcmcia-cs/files/pcmcia.rc,v 1.4 2003/06/08 13:39:17 latexer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcmcia-cs/files/pcmcia.rc,v 1.5 2004/02/04 22:35:33 latexer Exp $
RUN=/var/run
SC=${RUN}/pcmcia-scheme
@@ -15,6 +15,16 @@ cleanup()
done
}
+pcmcia_probe()
+{
+ MODULE=$1
+ OPTS=$2
+
+ /sbin/modprobe $MODULE $OPTS 2>/dev/null
+
+ return $?
+}
+
start() {
local code
# Scheme is set for the /etc/pcmcia/shared script
@@ -34,9 +44,15 @@ start() {
fi
if [ -z `fgrep "ds " /proc/modules | head -n1 | cut -c1` ] ; then
- /sbin/modprobe pcmcia_core $CORE_OPTS 2> /dev/null
- /sbin/modprobe $PCIC $PCIC_OPTS 2> /dev/null
- /sbin/modprobe ds
+ pcmcia_probe pcmcia_core $CORE_OPTS
+ if [ -n "$PCIC" ]; then
+ pcmcia_probe $PCIC $PCIC_OPTS || {
+ ewarn "'modprobe ${PCIC}' failed"
+ ewarn "Trying alternative PCIC driver: ${PCIC_ALT}"
+ pcmcia_probe $PCIC_ALT $PCIC_ALT_OPTS
+ }
+ fi
+ pcmcia_probe ds
fi
ebegin "Starting pcmcia"