clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since e3cda9a 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:
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 |
|
---|
| 34 | NODES=$DEVNAME
|
---|
| 35 | for sl in `udevinfo -q symlink -p $DEVPATH`; do
|
---|
| 36 | NODES="$NODES /dev/$sl"
|
---|
| 37 | done
|
---|
[a6cd72e] | 38 | boot_mesg "Avilable nodes: $NODES"
|
---|
[7e161ea] | 39 |
|
---|
| 40 | NODE=
|
---|
| 41 | declare -i FSCK=0
|
---|
| 42 | while read dn mp fs opts dump fsck x; do
|
---|
| 43 | for n in $NODES; do
|
---|
| 44 | if [ "$n" == "$dn" ] ; then
|
---|
| 45 | case $opts in
|
---|
| 46 | *hotplug*) : ;;
|
---|
| 47 | *) exit 0 ;;
|
---|
| 48 | esac
|
---|
| 49 | NODE="$n"
|
---|
| 50 | FSCK="$fsck"
|
---|
[a6cd72e] | 51 | boot_mesg "matching line for $DEVNAME:"
|
---|
| 52 | boot_mesg "$dn $mp $fs $opts $dump $fsck $x"
|
---|
[7e161ea] | 53 | break 2
|
---|
| 54 | fi
|
---|
| 55 | done
|
---|
| 56 | done < /etc/fstab
|
---|
| 57 |
|
---|
| 58 | if [ "$HOTPLUG_CHECK_FILESYSTEMS" == yes -a "$FSCK" -gt 0 ] ; then
|
---|
| 59 | MESSAGE="`fsck -a $DEVNAME`"
|
---|
| 60 | RET=$?
|
---|
[a6cd72e] | 61 | boot_mesg "$MESSAGE"
|
---|
[7e161ea] | 62 | case $RET in
|
---|
| 63 | 0|1) : ;;
|
---|
| 64 | 2|3)
|
---|
[a6cd72e] | 65 | boot_mesg "Please unplug device $DEVNAME, and plug it again"
|
---|
[7e161ea] | 66 | logger -t $0 "fsck for '$DEVNAME' failed. Will not mount it."
|
---|
| 67 | exit 0
|
---|
| 68 | ;;
|
---|
| 69 | *)
|
---|
| 70 | err_mesg "fsck failed on $DEVNAME. Please fsck filesystem manually."
|
---|
| 71 | logger -t $0 "fsck for '$DEVNAME' failed. Will not mount it."
|
---|
| 72 | exit 1
|
---|
| 73 | ;;
|
---|
| 74 | esac
|
---|
| 75 | fi
|
---|
| 76 |
|
---|
| 77 |
|
---|
| 78 | if [ -n "$NODE" ] ; then
|
---|
| 79 | MESSAGE="`mount -av "$NODE"`"
|
---|
| 80 | test $? != 0 && logger -t $0 "Could not mount '$DEVNAME'."
|
---|
[a6cd72e] | 81 | boot_mesg "$MESSAGE"
|
---|
[7e161ea] | 82 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.