coreutils: Use groupadd/groupdel for creating/removing dummy group

They look better than "echo >>" and "sed -i".  And I think an example
showing how to use groupadd/groupdel is good anyway.  The format of
/etc/group is already shown in chapter 7.
This commit is contained in:
Xi Ruoyao 2023-08-09 22:29:44 +08:00
parent 91f9a174b5
commit 7c306241b6
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -116,7 +116,7 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \
these tests are not skipped, add a temporary group and make the
user <systemitem class="username">tester</systemitem> a part of it:</para>
<screen><userinput remap="test">echo "dummy:x:102:tester" &gt;&gt; /etc/group</userinput></screen>
<screen><userinput remap="test">groupadd -g 102 dummy -U tester</userinput></screen>
<para>Fix some of the permissions so that the non-&root; user can
compile and run the tests:</para>
@ -134,7 +134,8 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \
<para>Remove the temporary group:</para>
<screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
<screen><userinput remap="test">groupdel dummy</userinput></screen>
<para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen>