/[vps]/baselayout-vserver/trunk/init.d/localmount
Gentoo

Contents of /baselayout-vserver/trunk/init.d/localmount

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Sat Sep 3 16:10:27 2005 UTC (10 years, 11 months ago) by hollow
File size: 1316 byte(s)
import initial baselayout sources (1.12.0_pre8)
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 && ! -d /proc/bus/usb ]] ; 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 usbgid=$(awk -F: '/^usb:/{print $3; exit}' /etc/group)
32 mount -t ${usbfs} usbfs /proc/bus/usb \
33 ${usbgid:+-o devmode=0664,devgid=${usbgid}}
34 eend $? "Failed to mount USB device filesystem"
35 fi
36
37 # Swap on loopback devices, and other weirdnesses
38 ebegin "Activating (possibly) more swap"
39 /sbin/swapon -a
40 eend $?
41
42 # Start dm-crypt mappings, if any
43 start_addon dm-crypt
44 }
45
46
47 # vim:ts=4

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20