OSDN Git Service

cfa640b931af9d9deb1b0d23fa94fced3afec427
[linuxjf/JF.git] / docs / LFS-BOOK / scripts / apds10.html
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">
4   <head>
5     <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
6     <title>
7       D.10. /etc/rc.d/init.d/mountfs
8     </title>
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" />
13   </head>
14   <body class="lfs" id="lfs-6.6">
15     <div class="navheader">
16       <h4>
17         Linux From Scratch - Version 6.6
18       </h4>
19       <h3>
20         付録 D. ブートスクリプトと sysconfig スクリプト version-20100124
21       </h3>
22       <ul>
23         <li class="prev">
24           <a accesskey="p" href="apds09.html" title=
25           "/etc/rc.d/init.d/checkfs">前のページ</a>
26           <p>
27             /etc/rc.d/init.d/checkfs
28           </p>
29         </li>
30         <li class="next">
31           <a accesskey="n" href="apds11.html" title=
32           "/etc/rc.d/init.d/udev_retry">次のページ</a>
33           <p>
34             /etc/rc.d/init.d/udev_retry
35           </p>
36         </li>
37         <li class="up">
38           <a accesskey="u" href="scripts.html" title=
39           "付録 D. ブートスクリプトと sysconfig スクリプト version-20100124">上に戻る</a>
40         </li>
41         <li class="home">
42           <a accesskey="h" href="../index.html" title=
43           "Linux From Scratch - Version 6.6">ホーム</a>
44         </li>
45       </ul>
46     </div>
47     <div class="wrap" lang="ja" xml:lang="ja">
48       <h1 class="sect1">
49         <a id="mountfs" name="mountfs"></a>D.10. /etc/rc.d/init.d/mountfs
50       </h1>
51       <pre class="screen">
52 #!/bin/sh
53 ########################################################################
54 # Begin $rc_base/init.d/mountfs
55 #
56 # Description : File System Mount Script
57 #
58 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
59 #
60 # Version     : 00.00
61 #
62 # Notes       :
63 #
64 ########################################################################
65
66 . /etc/sysconfig/rc
67 . ${rc_functions}
68
69 case "${1}" in
70     start)
71         boot_mesg "Remounting root file system in read-write mode..."
72         mount -n -o remount,rw / &gt;/dev/null
73         evaluate_retval
74
75         # Remove fsck-related file system watermarks.
76         rm -f /fastboot /forcefsck
77
78         boot_mesg "Recording existing mounts in /etc/mtab..."
79         &gt; /etc/mtab
80         mount -f / || failed=1
81         mount -f /proc || failed=1
82         mount -f /sys || failed=1
83         (exit ${failed})
84         evaluate_retval
85
86         # This will mount all filesystems that do not have _netdev in
87         # their option list.  _netdev denotes a network filesystem.
88         boot_mesg "Mounting remaining file systems..."
89         mount -a -O no_netdev &gt;/dev/null
90         evaluate_retval
91         ;;
92
93     stop)
94         boot_mesg "Unmounting all other currently mounted file systems..."
95         umount -a -d -r &gt;/dev/null
96         evaluate_retval
97         ;;
98
99     *)
100         echo "Usage: ${0} {start|stop}"
101         exit 1
102         ;;
103 esac
104
105 # End $rc_base/init.d/mountfs
106 </pre>
107     </div>
108     <div class="navfooter">
109       <ul>
110         <li class="prev">
111           <a accesskey="p" href="apds09.html" title=
112           "/etc/rc.d/init.d/checkfs">前のページ</a>
113           <p>
114             /etc/rc.d/init.d/checkfs
115           </p>
116         </li>
117         <li class="next">
118           <a accesskey="n" href="apds11.html" title=
119           "/etc/rc.d/init.d/udev_retry">次のページ</a>
120           <p>
121             /etc/rc.d/init.d/udev_retry
122           </p>
123         </li>
124         <li class="up">
125           <a accesskey="u" href="scripts.html" title=
126           "付録 D. ブートスクリプトと sysconfig スクリプト version-20100124">上に戻る</a>
127         </li>
128         <li class="home">
129           <a accesskey="h" href="../index.html" title=
130           "Linux From Scratch - Version 6.6">ホーム</a>
131         </li>
132       </ul>
133     </div>
134   </body>
135 </html>