clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since efb23d2 was a6cd72e, checked in by Jim Gifford <clfs@…>, 19 years ago |
r861@server (orig r859): jim | 2005-12-06 22:41:11 -0800
r994@server: jim | 2005-12-06 22:39:42 -0800
Updates from 077 OpenSuse Package
|
-
Property mode
set to
100755
|
File size:
978 bytes
|
Rev | Line | |
---|
[7e161ea] | 1 | #!/bin/sh
|
---|
| 2 | ########################################################################
|
---|
| 3 | #
|
---|
[a6cd72e] | 4 | # Description : Load ide
|
---|
[7e161ea] | 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 | #
|
---|
[a6cd72e] | 14 | # Notes :
|
---|
[7e161ea] | 15 | #
|
---|
| 16 | ########################################################################
|
---|
| 17 |
|
---|
[a6cd72e] | 18 | # calculate device name from bus and drive number
|
---|
[7e161ea] | 19 | device=${DEVPATH#/devices/*/ide?/}
|
---|
| 20 | drive=${device#?.}
|
---|
| 21 | bus=${device%.?}
|
---|
[a6cd72e] | 22 | unitnum=$((96 + 1 + $drive + $bus * 2))
|
---|
| 23 | name=$(printf "hd\\$(printf '%o' $unitnum)")
|
---|
[7e161ea] | 24 | procfile="/proc/ide/$name/media"
|
---|
| 25 |
|
---|
[a6cd72e] | 26 | # wait for /proc file to appear
|
---|
| 27 | loop=30
|
---|
[7e161ea] | 28 | while ! test -e $procfile; do
|
---|
| 29 | sleep 0.1;
|
---|
[a6cd72e] | 30 | test "$loop" -gt 0 || break
|
---|
[7e161ea] | 31 | loop=$(($loop - 1))
|
---|
| 32 | done
|
---|
| 33 |
|
---|
| 34 | read media < $procfile
|
---|
| 35 | case "$media" in
|
---|
| 36 | cdrom)
|
---|
| 37 | /sbin/modprobe ide-cd
|
---|
| 38 | ;;
|
---|
| 39 | disk)
|
---|
| 40 | /sbin/modprobe ide-disk
|
---|
| 41 | ;;
|
---|
| 42 | floppy)
|
---|
| 43 | /sbin/modprobe ide-floppy
|
---|
| 44 | ;;
|
---|
| 45 | tape)
|
---|
| 46 | /sbin/modprobe ide-tape
|
---|
| 47 | ;;
|
---|
| 48 | *)
|
---|
| 49 | /sbin/modprobe ide-generic
|
---|
| 50 | ;;
|
---|
| 51 | esac
|
---|
Note:
See
TracBrowser
for help on using the repository browser.