1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
7 D.4. /etc/rc.d/init.d/mountvirtfs
9 <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
10 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
11 <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
12 "text/css" media="print" />
14 <body class="lfs" id="lfs-7.2">
15 <div class="navheader">
17 Linux From Scratch - Version 7.2
20 付録 D. ブートスクリプトと sysconfig スクリプト version-20120901
24 <a accesskey="p" href="apds03.html" title=
25 "/etc/rc.d/init.d/functions">前のページ</a>
27 /etc/rc.d/init.d/functions
31 <a accesskey="n" href="apds05.html" title=
32 "/etc/rc.d/init.d/modules">次のページ</a>
34 /etc/rc.d/init.d/modules
38 <a accesskey="u" href="scripts.html" title=
39 "付録 D. ブートスクリプトと sysconfig スクリプト version-20120901">上に戻る</a>
42 <a accesskey="h" href="../index.html" title=
43 "Linux From Scratch - Version 7.2">ホーム</a>
47 <div class="wrap" lang="ja" xml:lang="ja">
49 <a id="mountvirtfs" name="mountvirtfs"></a>D.4.
50 /etc/rc.d/init.d/mountvirtfs
54 ########################################################################
57 # Description : Mount proc, sysfs, and run
59 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
60 # DJ Lucas - dj@linuxfromscratch.org
61 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
65 ########################################################################
68 # Provides: mountvirtfs
75 # Short-Description: Mounts /sys and /proc virtual (kernel) filesystems.
76 # Mounts /run (tmpfs) and /dev (devtmpfs).
77 # Description: Mounts /sys and /proc virtual (kernel) filesystems.
78 # Mounts /run (tmpfs) and /dev (devtmpfs).
79 # X-LFS-Provided-By: LFS
82 . /lib/lsb/init-functions
86 # Make sure /run/var is available before logging any messages
87 if ! mountpoint /run >/dev/null; then
88 mount -n /run || failed=1
91 mkdir -p /run/var /run/lock /run/shm
94 log_info_msg "Mounting virtual file systems: ${INFO}/run"
96 if ! mountpoint /proc >/dev/null; then
97 log_info_msg2 " ${INFO}/proc"
98 mount -n -o nosuid,noexec,nodev /proc || failed=1
101 if ! mountpoint /sys >/dev/null; then
102 log_info_msg2 " ${INFO}/sys"
103 mount -n -o nosuid,noexec,nodev /sys || failed=1
106 if ! mountpoint /dev >/dev/null; then
107 log_info_msg2 " ${INFO}/dev"
108 mount -n -o mode=0755,nosuid /dev || failed=1
111 # Copy devices that Udev >= 155 doesn't handle to /dev
112 cp -a /lib/udev/devices/* /dev
114 ln -sfn /run/shm /dev/shm
122 echo "Usage: ${0} {start}"
130 <div class="navfooter">
133 <a accesskey="p" href="apds03.html" title=
134 "/etc/rc.d/init.d/functions">前のページ</a>
136 /etc/rc.d/init.d/functions
140 <a accesskey="n" href="apds05.html" title=
141 "/etc/rc.d/init.d/modules">次のページ</a>
143 /etc/rc.d/init.d/modules
147 <a accesskey="u" href="scripts.html" title=
148 "付録 D. ブートスクリプトと sysconfig スクリプト version-20120901">上に戻る</a>
151 <a accesskey="h" href="../index.html" title=
152 "Linux From Scratch - Version 7.2">ホーム</a>