|
@@ -13,25 +13,19 @@
|
|
<para>It is time to create some structure in the LFS file system. Create a
|
|
<para>It is time to create some structure in the LFS file system. Create a
|
|
standard directory tree by issuing the following commands:</para>
|
|
standard directory tree by issuing the following commands:</para>
|
|
|
|
|
|
-<screen><userinput>install -dv /{bin,boot,etc/opt,home,lib,mnt}
|
|
|
|
-install -dv /{sbin,srv,usr/local,var,opt}
|
|
|
|
-install -dv /root -m 0750
|
|
|
|
-install -dv /tmp /var/tmp -m 1777
|
|
|
|
-install -dv /media/{floppy,cdrom}
|
|
|
|
-install -dv /usr/{bin,include,lib,sbin,share,src}
|
|
|
|
-ln -sv share/{man,doc,info} /usr
|
|
|
|
-install -dv /usr/share/{doc,info,locale,man}
|
|
|
|
-install -dv /usr/share/{misc,terminfo,zoneinfo}
|
|
|
|
-install -dv /usr/share/man/man{1..8}
|
|
|
|
-install -dv /usr/local/{bin,etc,include,lib,sbin,share,src}
|
|
|
|
-ln -sv share/{man,doc,info} /usr/local
|
|
|
|
-install -dv /usr/local/share/{doc,info,locale,man}
|
|
|
|
-install -dv /usr/local/share/{misc,terminfo,zoneinfo}
|
|
|
|
-install -dv /usr/local/share/man/man{1,2,3,4,5,6,7,8}
|
|
|
|
-install -dv /var/{lock,log,mail,run,spool}
|
|
|
|
-install -dv /var/{opt,cache,lib/{misc,locate},local}
|
|
|
|
-install -dv /opt/{bin,doc,include,info}
|
|
|
|
-install -dv /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen>
|
|
|
|
|
|
+<screen><userinput>mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
|
|
|
|
+mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
|
|
|
|
+install -dv -m 0750 /root
|
|
|
|
+install -dv -m 1777 /tmp /var/tmp
|
|
|
|
+mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
|
|
|
|
+mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
|
|
|
|
+mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
|
|
|
|
+mkdir -pv /usr/{,local/}share/man/man{1..8}
|
|
|
|
+for dir in /usr /usr/local; do
|
|
|
|
+ ln -sv share/{man,doc,info} $dir
|
|
|
|
+done
|
|
|
|
+mkdir -v /var/{lock,log,mail,run,spool}
|
|
|
|
+mkdir -pv /var/{opt,cache,lib/{misc,locate},local}</userinput></screen>
|
|
|
|
|
|
<para>Directories are, by default, created with permission mode 755, but
|
|
<para>Directories are, by default, created with permission mode 755, but
|
|
this is not desirable for all directories. In the commands above, two
|
|
this is not desirable for all directories. In the commands above, two
|
|
@@ -48,21 +42,22 @@ install -dv /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen>
|
|
another user's files from them. The latter is prohibited by the so-called
|
|
another user's files from them. The latter is prohibited by the so-called
|
|
<quote>sticky bit,</quote> the highest bit (1) in the 1777 bit mask.</para>
|
|
<quote>sticky bit,</quote> the highest bit (1) in the 1777 bit mask.</para>
|
|
|
|
|
|
- <note>
|
|
|
|
- <para>Notice the two different constructions above for creating multiple
|
|
|
|
- man directories: <command>install -d /usr/share/man/man{1..8}</command> and
|
|
|
|
- <command>install -d /usr/local/share/man/man{1,2,3,4,5,6,7,8}</command>. The
|
|
|
|
- first one is new since Bash 3.0. This new feature will help make repetitive
|
|
|
|
- commands easier to type.</para>
|
|
|
|
- </note>
|
|
|
|
-
|
|
|
|
<sect2>
|
|
<sect2>
|
|
<title>FHS Compliance Note</title>
|
|
<title>FHS Compliance Note</title>
|
|
|
|
|
|
- <para>The directory tree is based on the Filesystem Hierarchy Standard
|
|
|
|
- (FHS) (available at <ulink url="http://www.pathname.com/fhs/"/>). In
|
|
|
|
- addition to the tree created above, this standard stipulates the existence
|
|
|
|
- of <filename class="directory">/usr/local/games</filename> and <filename
|
|
|
|
|
|
+ <para>The directory tree is based on the Filesystem Hierarchy Standard (FHS)
|
|
|
|
+ (available at <ulink url="http://www.pathname.com/fhs/"/>). In addition to
|
|
|
|
+ the FHS, we create compatibility symlinks for the <filename
|
|
|
|
+ class="directory">man</filename>, <filename
|
|
|
|
+ class="directory">doc</filename>, and <filename
|
|
|
|
+ class="directory">info</filename> directories since many packages still try
|
|
|
|
+ to install their documentation into <filename
|
|
|
|
+ class="directory">/usr/<directory></filename> or <filename
|
|
|
|
+ class="directory">/usr/local/<directory></filename> as opposed to
|
|
|
|
+ <filename class="directory">/usr/share/<directory></filename> or
|
|
|
|
+ <filename class="directory">/usr/local/share/<directory></filename>.
|
|
|
|
+ The FHS also stipulates the existence of <filename
|
|
|
|
+ class="directory">/usr/local/games</filename> and <filename
|
|
class="directory">/usr/share/games</filename>. The FHS is not precise as to
|
|
class="directory">/usr/share/games</filename>. The FHS is not precise as to
|
|
the structure of the <filename class="directory">/usr/local/share</filename>
|
|
the structure of the <filename class="directory">/usr/local/share</filename>
|
|
subdirectory, so we create only the directories that are needed. However,
|
|
subdirectory, so we create only the directories that are needed. However,
|