/[baselayout]/branches/rc-scripts-1_6/init.d/localmount
Gentoo

Contents of /branches/rc-scripts-1_6/init.d/localmount

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1231 - (show annotations) (download)
Mon Jun 13 02:25:31 2005 UTC (9 years, 1 month ago) by vapier
File size: 1373 byte(s)
merge cvs Header removal from trunk
1 #!/sbin/runscript
2 # Copyright 1999-2005 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 depend() {
6 need checkfs
7 }
8
9 start() {
10 # Mount local filesystems in /etc/fstab.
11 ebegin "Mounting local filesystems"
12 mount -at noproc,noshm,no${NET_FS_LIST// /,no} >/dev/null
13 eend $? "Some local filesystem failed to mount"
14
15 # Make sure we insert usbcore if its a module
16 if [[ -f /proc/modules ]] ; then
17 # >/dev/null to hide errors from non-USB users
18 modprobe usbcore &> /dev/null
19 fi
20
21 # Check what USB fs the kernel support. Currently
22 # 2.5+ kernels, and later 2.4 kernels have 'usbfs',
23 # while older kernels have 'usbdevfs'.
24 local usbfs=$(grep -Fow usbfs /proc/filesystems ||
25 grep -Fow usbdevfs /proc/filesystems)
26
27 if [[ -n ${usbfs} ]] && \
28 [[ -e /proc/bus/usb && ! -e /proc/bus/usb/devices ]]
29 then
30 ebegin "Mounting USB device filesystem (${usbfs})"
31 # # Fetch usb gid from /etc/group; fixes bug 35860
32 # usbgid=$(awk -F: '/^usb:/{print $3; exit}' /etc/group)
33 # mount -t ${usbfs} ${usbgid:+-o devmode=0664,devgid=$usbgid}
34 mount -t ${usbfs} usbfs /proc/bus/usb &>/dev/null
35 eend $? "Failed to mount USB device filesystem"
36 fi
37
38 # Swap on loopback devices, and other weirdnesses
39 ebegin "Activating (possibly) more swap"
40 /sbin/swapon -a
41 eend $?
42
43 # Start dm-crypt mappings, if any
44 start_addon dm-crypt
45 }
46
47
48 # vim:ts=4

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20