Mention mergemaster(8) in the "Update /etc" and "Update /dev" sections, plus

a couple of other small changes to the "Update /etc" section.
This commit is contained in:
Ben Smithurst 2000-08-21 19:10:18 +00:00
parent 8f61bed60b
commit c60bd985a8
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=7861
2 changed files with 60 additions and 34 deletions
en_US.ISO8859-1/books/handbook/cutting-edge
en_US.ISO_8859-1/books/handbook/cutting-edge

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.53 2000/07/23 16:24:48 nik Exp $
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.54 2000/08/20 17:18:42 chris Exp $
-->
<chapter id="cutting-edge">
@ -873,15 +873,24 @@ Script done, &hellip;</screen>
</sect2>
<sect2>
<title>Update <filename>/etc</filename></title>
<title>Update files not updated by
<command>make world</command></title>
<para>Remaking the world will not update certain directories (in
particular, <filename>/etc</filename>, <filename>/var</filename> and
<filename>/usr</filename>) with new or changed configuration files.
This is something you have to do by hand, eyeball, and judicious use
of &man.diff.1;.</para>
<para>You cannot just copy over the files from
<filename>/usr</filename>) with new or changed configuration files.</para>
<para>The simplest way to update these files is to use
&man.mergemaster.8;, though it is possible to do it manually
if you would prefer to do that. We strongly recommend you
use &man.mergemaster.8;, however, and if you do then you
can skip forward to the <link linkend="update-dev">next
section</link>, since &man.mergemaster.8; is very simple to use.
You should read the manual page first, and make a backup of
<filename>/etc</filename> in case anything goes wrong.</para>
<para>If you wish to do the update manually,
you cannot just copy over the files from
<filename>/usr/src/etc</filename> to <filename>/etc</filename> and
have it work. Some of these files must be <quote>installed</quote>
first. This is because the <filename>/usr/src/etc</filename>
@ -889,8 +898,8 @@ Script done, &hellip;</screen>
<filename>/etc</filename> directory should look like. In addition,
there are files that should be in <filename>/etc</filename> that are
not in <filename>/usr/src/etc</filename>.</para>
<para>The simplest way to do this is to install the files into a new
<para>The simplest way to do this by hand is to install the files into a new
directory, and then work through them looking for differences.</para>
<warning>
@ -923,14 +932,12 @@ Script done, &hellip;</screen>
The simplest way to do this is to:</para>
<screen>&prompt.root; <userinput>cd /var/tmp/root</userinput>
&prompt.root; <userinput>find -d . -type d | /usr/bin/perl -lne \
'opendir(D,$_);@f=readdir(D);rmdir if $#f == 1;closedir(D);'</userinput></screen>
&prompt.root; <userinput>find -d . -type d | xargs rmdir 2&gt;/dev/null</userinput></screen>
<para>This does a depth first search, examines each directory, and if
the number of files in that directory is 2 (<quote/1/ is not a typo in
the script) i.e., <quote/<filename/.// and <quote/<filename/..// then
it removes the directory.</para>
<para>This will remove all empty directories. (Standard error is
redirected to <filename>/dev/null</filename> to prevent the warnings
about the directories that are not empty.)</parA>
<para><filename>/var/tmp/root</filename> now contains all the files that
should be placed in appropriate locations below
<filename>/</filename>. You now have to go through each of these
@ -1035,7 +1042,7 @@ Script done, &hellip;</screen>
</tip>
</sect2>
<sect2>
<sect2 id="update-dev">
<title>Update <filename>/dev</filename></title>
<note>
@ -1052,6 +1059,12 @@ Script done, &hellip;</screen>
<filename>/dev</filename>.</para>
<screen>&prompt.root; <userinput>cp /var/tmp/root/dev/MAKEDEV /dev</userinput></screen>
<para>If you used &man.mergemaster.8; to
update <filename>/etc</filename>, then your
<filename>MAKEDEV</filename> script should have been updated
already, though it can't hurt to check (with &man.diff.1;)
and copy it manually if necessary.</para>
</step>
<step>

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.53 2000/07/23 16:24:48 nik Exp $
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v 1.54 2000/08/20 17:18:42 chris Exp $
-->
<chapter id="cutting-edge">
@ -873,15 +873,24 @@ Script done, &hellip;</screen>
</sect2>
<sect2>
<title>Update <filename>/etc</filename></title>
<title>Update files not updated by
<command>make world</command></title>
<para>Remaking the world will not update certain directories (in
particular, <filename>/etc</filename>, <filename>/var</filename> and
<filename>/usr</filename>) with new or changed configuration files.
This is something you have to do by hand, eyeball, and judicious use
of &man.diff.1;.</para>
<para>You cannot just copy over the files from
<filename>/usr</filename>) with new or changed configuration files.</para>
<para>The simplest way to update these files is to use
&man.mergemaster.8;, though it is possible to do it manually
if you would prefer to do that. We strongly recommend you
use &man.mergemaster.8;, however, and if you do then you
can skip forward to the <link linkend="update-dev">next
section</link>, since &man.mergemaster.8; is very simple to use.
You should read the manual page first, and make a backup of
<filename>/etc</filename> in case anything goes wrong.</para>
<para>If you wish to do the update manually,
you cannot just copy over the files from
<filename>/usr/src/etc</filename> to <filename>/etc</filename> and
have it work. Some of these files must be <quote>installed</quote>
first. This is because the <filename>/usr/src/etc</filename>
@ -889,8 +898,8 @@ Script done, &hellip;</screen>
<filename>/etc</filename> directory should look like. In addition,
there are files that should be in <filename>/etc</filename> that are
not in <filename>/usr/src/etc</filename>.</para>
<para>The simplest way to do this is to install the files into a new
<para>The simplest way to do this by hand is to install the files into a new
directory, and then work through them looking for differences.</para>
<warning>
@ -923,14 +932,12 @@ Script done, &hellip;</screen>
The simplest way to do this is to:</para>
<screen>&prompt.root; <userinput>cd /var/tmp/root</userinput>
&prompt.root; <userinput>find -d . -type d | /usr/bin/perl -lne \
'opendir(D,$_);@f=readdir(D);rmdir if $#f == 1;closedir(D);'</userinput></screen>
&prompt.root; <userinput>find -d . -type d | xargs rmdir 2&gt;/dev/null</userinput></screen>
<para>This does a depth first search, examines each directory, and if
the number of files in that directory is 2 (<quote/1/ is not a typo in
the script) i.e., <quote/<filename/.// and <quote/<filename/..// then
it removes the directory.</para>
<para>This will remove all empty directories. (Standard error is
redirected to <filename>/dev/null</filename> to prevent the warnings
about the directories that are not empty.)</parA>
<para><filename>/var/tmp/root</filename> now contains all the files that
should be placed in appropriate locations below
<filename>/</filename>. You now have to go through each of these
@ -1035,7 +1042,7 @@ Script done, &hellip;</screen>
</tip>
</sect2>
<sect2>
<sect2 id="update-dev">
<title>Update <filename>/dev</filename></title>
<note>
@ -1052,6 +1059,12 @@ Script done, &hellip;</screen>
<filename>/dev</filename>.</para>
<screen>&prompt.root; <userinput>cp /var/tmp/root/dev/MAKEDEV /dev</userinput></screen>
<para>If you used &man.mergemaster.8; to
update <filename>/etc</filename>, then your
<filename>MAKEDEV</filename> script should have been updated
already, though it can't hurt to check (with &man.diff.1;)
and copy it manually if necessary.</para>
</step>
<step>