clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since ecd487bd was f59ed2c, checked in by Jim Gifford <clfs@…>, 19 years ago |
r994@server (orig r992): jim | 2006-01-03 12:07:10 -0800
r1255@server: jim | 2006-01-03 12:06:51 -0800
Updates from OpenSuse
|
-
Property mode
set to
100755
|
File size:
1.7 KB
|
Rev | Line | |
---|
[a6cd72e] | 1 | #!/bin/sh
|
---|
| 2 | ########################################################################
|
---|
| 3 | #
|
---|
| 4 | # Description : Input devices
|
---|
| 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 | ########################################################################
|
---|
[7e161ea] | 17 |
|
---|
[a6cd72e] | 18 | . /etc/sysconfig/rc
|
---|
| 19 | . ${rc_functions}
|
---|
[7e161ea] | 20 | . /etc/sysconfig/storage
|
---|
| 21 |
|
---|
| 22 | test "$HOTPLUG_MOUNT_FSTAB" != yes && exit
|
---|
| 23 |
|
---|
| 24 | # Handle only partitions of sd
|
---|
| 25 | case "$DEVNAME" in
|
---|
| 26 | /dev/sd*|/dev/hd*) : ;;
|
---|
| 27 | *) exit 0 ;;
|
---|
| 28 | esac
|
---|
| 29 | case "$DEVNAME" in
|
---|
| 30 | *sd[a-z]|*hd[a-z]) exit 0 ;;
|
---|
| 31 | esac
|
---|
| 32 |
|
---|
| 33 | NODES=$DEVNAME
|
---|
| 34 | for sl in `udevinfo -q symlink -p $DEVPATH`; do
|
---|
| 35 | NODES="$NODES /dev/$sl"
|
---|
| 36 | done
|
---|
[a6cd72e] | 37 | boot_mesg "Avilable nodes: $NODES"
|
---|
[7e161ea] | 38 |
|
---|
| 39 | NODE=
|
---|
| 40 | declare -i FSCK=0
|
---|
| 41 | while read dn mp fs opts dump fsck x; do
|
---|
| 42 | for n in $NODES; do
|
---|
| 43 | if [ "$n" == "$dn" ] ; then
|
---|
| 44 | case $opts in
|
---|
| 45 | *hotplug*) : ;;
|
---|
| 46 | *) exit 0 ;;
|
---|
| 47 | esac
|
---|
| 48 | NODE="$n"
|
---|
| 49 | FSCK="$fsck"
|
---|
[a6cd72e] | 50 | boot_mesg "matching line for $DEVNAME:"
|
---|
| 51 | boot_mesg "$dn $mp $fs $opts $dump $fsck $x"
|
---|
[7e161ea] | 52 | break 2
|
---|
| 53 | fi
|
---|
| 54 | done
|
---|
| 55 | done < /etc/fstab
|
---|
| 56 |
|
---|
| 57 | if [ "$HOTPLUG_CHECK_FILESYSTEMS" == yes -a "$FSCK" -gt 0 ] ; then
|
---|
| 58 | MESSAGE="`fsck -a $DEVNAME`"
|
---|
| 59 | RET=$?
|
---|
[a6cd72e] | 60 | boot_mesg "$MESSAGE"
|
---|
[7e161ea] | 61 | case $RET in
|
---|
| 62 | 0|1) : ;;
|
---|
| 63 | 2|3)
|
---|
[a6cd72e] | 64 | boot_mesg "Please unplug device $DEVNAME, and plug it again"
|
---|
[7e161ea] | 65 | logger -t $0 "fsck for '$DEVNAME' failed. Will not mount it."
|
---|
| 66 | exit 0
|
---|
| 67 | ;;
|
---|
| 68 | *)
|
---|
| 69 | err_mesg "fsck failed on $DEVNAME. Please fsck filesystem manually."
|
---|
| 70 | logger -t $0 "fsck for '$DEVNAME' failed. Will not mount it."
|
---|
| 71 | exit 1
|
---|
| 72 | ;;
|
---|
| 73 | esac
|
---|
| 74 | fi
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | if [ -n "$NODE" ] ; then
|
---|
| 78 | MESSAGE="`mount -av "$NODE"`"
|
---|
| 79 | test $? != 0 && logger -t $0 "Could not mount '$DEVNAME'."
|
---|
[a6cd72e] | 80 | boot_mesg "$MESSAGE"
|
---|
[7e161ea] | 81 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.