clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 03b5f90 was 7e161ea, checked in by Jim Gifford <clfs@…>, 19 years ago |
r833@server (orig r831): jim | 2005-12-05 10:42:24 -0800
Added: udev package for Cross-LFS. Work in Progress
|
-
Property mode
set to
100644
|
File size:
871 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | ########################################################################
|
---|
3 | #
|
---|
4 | # Description : load_ide_modules
|
---|
5 | #
|
---|
6 | # Authors : Based on Open Suse Udev Rules
|
---|
7 | # kay.sievers@suse.de
|
---|
8 | #
|
---|
9 | # Adapted to : Jim Gifford
|
---|
10 | # LFS
|
---|
11 | #
|
---|
12 | # Version : 00.00
|
---|
13 | #
|
---|
14 | # Notes :
|
---|
15 | #
|
---|
16 | ########################################################################
|
---|
17 |
|
---|
18 | device=${DEVPATH#/devices/*/ide?/}
|
---|
19 | drive=${device#?.}
|
---|
20 | bus=${device%.?}
|
---|
21 | name=$(printf "hd%x" $(($drive + $bus * 2 + 10)))
|
---|
22 | procfile="/proc/ide/$name/media"
|
---|
23 |
|
---|
24 | loop=50
|
---|
25 | while ! test -e $procfile; do
|
---|
26 | sleep 0.1;
|
---|
27 | test "$loop" -gt 0 || exit 1
|
---|
28 | loop=$(($loop - 1))
|
---|
29 | done
|
---|
30 |
|
---|
31 | read media < $procfile
|
---|
32 | case "$media" in
|
---|
33 | cdrom)
|
---|
34 | /sbin/modprobe ide-cd
|
---|
35 | ;;
|
---|
36 | disk)
|
---|
37 | /sbin/modprobe ide-disk
|
---|
38 | ;;
|
---|
39 | floppy)
|
---|
40 | /sbin/modprobe ide-floppy
|
---|
41 | ;;
|
---|
42 | tape)
|
---|
43 | /sbin/modprobe ide-tape
|
---|
44 | ;;
|
---|
45 | *)
|
---|
46 | /sbin/modprobe ide-generic
|
---|
47 | ;;
|
---|
48 | esac
|
---|
Note:
See
TracBrowser
for help on using the repository browser.