Date: Sun, 20 Aug 2000 19:59:30 +0100 From: Ben Smithurst <ben@FreeBSD.org> To: Dinesh Punjabi <dpunjabi@nyx.net> Cc: doc@FreeBSD.org, Kent Stewart <kstewart@urx.com> Subject: Re: 18.4.7. Update /etc (this section is very confusing) Message-ID: <20000820195929.X58928@strontium.scientia.demon.co.uk> In-Reply-To: <000901c00ac5$29fa79d0$14fa90cc@intersols.com> References: <000701c00a52$6a793be0$14fa90cc@intersols.com> <20000820043554.Q58928@strontium.scientia.demon.co.uk> <000901c00ac5$29fa79d0$14fa90cc@intersols.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Dinesh Punjabi wrote: > It talks about updating /etc as the heading, yet it says > that /usr and /var may also need to be updated. > So change the heading to reflect this. > > Secondly, mention mergemaster as a way to merge things. Well, I might commit this diff (unless anyone has a good reason why not). It doesn't completely clear it up, but it mentions mergemaster at least, and then once people know about that they can ignore the rest of the section. Perhaps the section can be cleaned up a bit more when someone does it, or I have a bit more time to do it myself. Index: cutting-edge/chapter.sgml =================================================================== RCS file: /usr/cvs/doc/en_US.ISO_8859-1/books/handbook/cutting-edge/chapter.sgml,v retrieving revision 1.53 diff -u -r1.53 chapter.sgml --- chapter.sgml 2000/07/23 16:24:48 1.53 +++ chapter.sgml 2000/08/20 18:44:47 @@ -873,15 +873,24 @@ </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 @@ <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 @@ 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 . -type d | xargs rmdir 2>/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 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 @@ </tip> </sect2> - <sect2> + <sect2 id="update-dev"> <title>Update <filename>/dev</filename></title> <note> @@ -1052,6 +1059,12 @@ <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> -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D FreeBSD Documentation Project / To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000820195929.X58928>