clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since c30178f was eaa3fd2, checked in by Jim Gifford <clfs@…>, 18 years ago |
Fixed cdsymlink_helper.sh - Remove helper functions
|
-
Property mode
set to
100755
|
File size:
1008 bytes
|
Rev | Line | |
---|
[93a4751] | 1 | #!/bin/sh
|
---|
| 2 | ########################################################################
|
---|
| 3 | #
|
---|
| 4 | # Description : cdsymlink_helper.sh
|
---|
| 5 | #
|
---|
| 6 | # Authors : Jim Gifford
|
---|
| 7 | #
|
---|
| 8 | # Version : 00.00
|
---|
| 9 | #
|
---|
| 10 | # Notes :
|
---|
| 11 | #
|
---|
| 12 | ########################################################################
|
---|
| 13 |
|
---|
| 14 | . /etc/sysconfig/udev_helper
|
---|
| 15 |
|
---|
| 16 | KERN_NAME="$1"
|
---|
[df6532c] | 17 | BUS="$2"
|
---|
| 18 | test=0
|
---|
[93a4751] | 19 |
|
---|
| 20 | if [ "$KERN_NAME" = "" ]; then
|
---|
| 21 | mesg Bad invocation: \$1 is not set
|
---|
| 22 | exit 1
|
---|
| 23 | fi
|
---|
[e6c3117] | 24 |
|
---|
[df6532c] | 25 | if [ "$BUS" = "ide" ]; then
|
---|
| 26 | FILES="`ls /sys/bus/ide/drivers/ide-cdrom | grep '\.' `"
|
---|
| 27 | for file in $FILES; do
|
---|
| 28 | TEST="`ls /sys/bus/ide/drivers/ide-cdrom/$file | grep -c $KERN_NAME`"
|
---|
| 29 | if [ "$TEST" = "1" ]; then
|
---|
| 30 | link="`echo $file | cut -f2 -d.`"
|
---|
| 31 | while [ $test -lt 1 ] ; do
|
---|
| 32 | if [ -e /dev/cdrom$link ]; then
|
---|
| 33 | link=$[$link+1]
|
---|
| 34 | else
|
---|
| 35 | test=1
|
---|
| 36 | echo $link
|
---|
| 37 | fi
|
---|
| 38 | done
|
---|
| 39 | fi
|
---|
| 40 | done
|
---|
| 41 | fi
|
---|
| 42 |
|
---|
| 43 | if [ "$BUS" = "scsi" ]; then
|
---|
| 44 | link=$KERN_NAME
|
---|
| 45 | while [ $test -lt 1 ] ; do
|
---|
| 46 | if [ -e /dev/cdrom$link ]; then
|
---|
| 47 | link=$[$link+1]
|
---|
| 48 | else
|
---|
| 49 | test=1
|
---|
| 50 | echo $link
|
---|
| 51 | fi
|
---|
| 52 | done
|
---|
| 53 | fi
|
---|
| 54 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.