clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since c044e1b 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
|
Line | |
---|
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 | ########################################################################
|
---|
17 |
|
---|
18 | . /etc/sysconfig/rc
|
---|
19 | . ${rc_functions}
|
---|
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
|
---|
37 | boot_mesg "Avilable nodes: $NODES"
|
---|
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"
|
---|
50 | boot_mesg "matching line for $DEVNAME:"
|
---|
51 | boot_mesg "$dn $mp $fs $opts $dump $fsck $x"
|
---|
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=$?
|
---|
60 | boot_mesg "$MESSAGE"
|
---|
61 | case $RET in
|
---|
62 | 0|1) : ;;
|
---|
63 | 2|3)
|
---|
64 | boot_mesg "Please unplug device $DEVNAME, and plug it again"
|
---|
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'."
|
---|
80 | boot_mesg "$MESSAGE"
|
---|
81 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.