/[baselayout]/branches/baselayout-1_12/init.d/localmount
Gentoo

Contents of /branches/baselayout-1_12/init.d/localmount

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2050 - (show annotations) (download)
Fri Jun 2 20:02:40 2006 UTC (8 years, 4 months ago) by uberlord
File size: 1400 byte(s)
    Allow LC_* and LANG vars through to runscript.sh by default.

    net.lo now comes after bootmisc, #135118 thanks to Oldrich Jedlicka.

    arping.sh now has MAC address support, #134253 thanks to Oldrich Jedlicka.

    pppd.sh now updates secret files with a blank password, #134337

    Remove swapon call from /sbin/rc as localmount already calls it,
    partial fix for #134489
1 #!/sbin/runscript
2 # Copyright 1999-2006 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} -O no_netdev >/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=$(echo $(getent group usb) | awk -F: '{print $3}')
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 # We do our swapping here instead of rc so we can get urandom started
38 # before us for people that like an encrypted swap.
39 ebegin "Activating (possible) 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