[systemd-devel] [PATCH] Documentation changes to reflect that isolate is for target and snapshot only and that no extension filenames default to .target.

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Nov 29 10:24:10 PST 2014


On Sat, Nov 29, 2014 at 11:30:58AM -0500, Chris Atkinson wrote:
> Subject: [PATCH] Documentation changes to reflect that isolate is for target
>  and snapshot only and that no extension filenames default to .target.
Actually you can isolate anything that has AllowIsolate=true. Existing
documentation already mentions that, so I skipped parts of you patch
which assumed that isolate only works for those unit types. The rest
is applied.

(I rewrote the $subject too, since patch subjects should fit in gitk,
which means that they should not be longer than ~70-80 characters.)

Zbyszek

> 
> ---
>  man/systemctl.xml         | 12 ++++++++----
>  src/systemctl/systemctl.c |  2 +-
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/man/systemctl.xml b/man/systemctl.xml
> index 4a7abab..e6f438c 100644
> --- a/man/systemctl.xml
> +++ b/man/systemctl.xml
> @@ -705,7 +705,10 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
>  
>            <listitem>
>              <para>Start the unit specified on the command line and its
> -            dependencies and stop all others.</para>
> +            dependencies and stop all others. This applies only to 
> +            <literal>target</literal> and <literal>snapshot</literal> units.
> +            If a filename with no extension is given, an extension of
> +	    <literal>.target</literal> will be assumed.</para>
>  
>              <para>This is similar to changing the runlevel in a
>              traditional init system. The <command>isolate</command>
> @@ -713,7 +716,8 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
>              in the new unit, possibly including the graphical
>              environment or terminal you are currently using.</para>
>  
> -            <para>Note that this is allowed only on units where
> +            <para>Note that for <literal>target</literal> units this is 
> +            allowed only on units where
>              <option>AllowIsolate=</option> is enabled. See
>              <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
>              for details.</para>
> @@ -1597,9 +1601,9 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
>        <programlisting># systemctl start sshd</programlisting> and
>        <programlisting># systemctl start sshd.service</programlisting>
>        are equivalent, as are
> -      <programlisting># systemctl isolate snapshot-11</programlisting>
> +      <programlisting># systemctl isolate default</programlisting>
>        and
> -      <programlisting># systemctl isolate snapshot-11.snapshot</programlisting>
> +      <programlisting># systemctl isolate default.target</programlisting>
>        Note that (absolute) paths to device nodes are automatically
>        converted to device unit names, and other (absolute) paths to
>        mount unit names.
> diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
> index ffb97df..2176f15 100644
> --- a/src/systemctl/systemctl.c
> +++ b/src/systemctl/systemctl.c
> @@ -5770,7 +5770,7 @@ static void systemctl_help(void) {
>                 "                                  otherwise start or restart\n"
>                 "  reload-or-try-restart NAME...   Reload one or more units if possible,\n"
>                 "                                  otherwise restart if active\n"
> -               "  isolate NAME                    Start one unit and stop all others\n"
> +               "  isolate NAME                    Start one target/snapshot unit and stop all others\n"
>                 "  kill NAME...                    Send signal to processes of a unit\n"
>                 "  is-active PATTERN...            Check whether units are active\n"
>                 "  is-failed PATTERN...            Check whether units are failed\n"
> -- 
> 2.1.3
> 



More information about the systemd-devel mailing list