chiark / gitweb /
core: warn and ignore SysVStartPriority=
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 30 Nov 2014 15:42:53 +0000 (10:42 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 1 Dec 2014 00:10:40 +0000 (19:10 -0500)
Option was being parsed but not used for anything.

man/systemd.service.xml
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h
src/core/service.c
src/core/service.h
src/sysv-generator/sysv-generator.c

index e563b1968bb9e17d6a39fc229124c3513f4c9855..6e81c5429bbd316f1fd00a5f8b2c69abd6bffab1 100644 (file)
 
         </refsect1>
 
-        <refsect1>
-                <title>Compatibility Options</title>
-
-                <para>The following options are also available in the
-                <literal>[Service]</literal> section, but exist purely
-                for compatibility reasons and should not be used in
-                newly written service files.</para>
-
-                <variablelist class='unit-directives'>
-                        <varlistentry>
-                                <term><varname>SysVStartPriority=</varname></term>
-                                <listitem><para>Set the SysV start
-                                priority to use to order this service
-                                in relation to SysV services lacking
-                                LSB headers. This option is only
-                                necessary to fix ordering in relation
-                                to legacy SysV services that have no
-                                ordering information encoded in the
-                                script headers. As such, it should only
-                                be used as a temporary compatibility
-                                option and should not be used in new unit
-                                files. Almost always, it is a better
-                                choice to add explicit ordering
-                                directives via
-                                <varname>After=</varname> or
-                                <varname>Before=</varname>,
-                                instead. For more details, see
-                                <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
-                                If used, pass an integer value in the
-                                range 0-99.</para></listitem>
-                        </varlistentry>
-                </variablelist>
-        </refsect1>
-
         <refsect1>
                 <title>Command lines</title>
 
index b5a8e31c09db793b42959abef273da95a35b3236..e0ffaa605a55c3f4976850e28375f8ff684e9753 100644 (file)
@@ -223,9 +223,7 @@ Service.GuessMainPID,            config_parse_bool,                  0,
 Service.RestartPreventExitStatus, config_parse_set_status,           0,                             offsetof(Service, restart_prevent_status)
 Service.RestartForceExitStatus,  config_parse_set_status,            0,                             offsetof(Service, restart_force_status)
 Service.SuccessExitStatus,       config_parse_set_status,            0,                             offsetof(Service, success_status)
-m4_ifdef(`HAVE_SYSV_COMPAT',
-`Service.SysVStartPriority,      config_parse_sysv_priority,         0,                             offsetof(Service, sysv_start_priority)',
-`Service.SysVStartPriority,      config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
+Service.SysVStartPriority,       config_parse_warn_compat,           DISABLED_LEGACY,               0
 Service.NonBlocking,             config_parse_bool,                  0,                             offsetof(Service, exec_context.non_blocking)
 Service.BusName,                 config_parse_unit_string_printf,    0,                             offsetof(Service, bus_name)
 Service.NotifyAccess,            config_parse_notify_access,         0,                             offsetof(Service, notify_access)
index 786737da94bb7991e0fdc0704c72f686e8c1dc95..d3859683a1b62841fa5a45b1df4e3055679d6ab0 100644 (file)
@@ -83,6 +83,10 @@ int config_parse_warn_compat(
                 log_syntax(unit, LOG_DEBUG, filename, line, EINVAL,
                            "Support for option %s= has been disabled at compile time and it is ignored", lvalue);
                 break;
+        case DISABLED_LEGACY:
+                log_syntax(unit, LOG_INFO, filename, line, EINVAL,
+                           "Support for option %s= has been removed and it is ignored", lvalue);
+                break;
         case DISABLED_EXPERIMENTAL:
                 log_syntax(unit, LOG_INFO, filename, line, EINVAL,
                            "Support for option %s= has not yet been enabled and it is ignored", lvalue);
index 4756830302d63fdf46e1d7be2534c34fca67bec3..21e0871e8b6e3599b61c384503f1a24db2aa8694 100644 (file)
@@ -110,5 +110,6 @@ extern const char load_fragment_gperf_nulstr[];
 
 typedef enum Disabled {
         DISABLED_CONFIGURATION,
+        DISABLED_LEGACY,
         DISABLED_EXPERIMENTAL,
 } Disabled;
index 9db773b3998a27ec0f1ab69a727c0887688c16f2..53a2935e52d04bd4d6857def6c79e6278b82229b 100644 (file)
@@ -546,13 +546,6 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
                 exec_command_dump_list(s->exec_command[c], f, prefix2);
         }
 
-#ifdef HAVE_SYSV_COMPAT
-        if (s->sysv_start_priority >= 0)
-                fprintf(f,
-                        "%sSysVStartPriority: %i\n",
-                        prefix, s->sysv_start_priority);
-#endif
-
         if (s->status_text)
                 fprintf(f, "%sStatus Text: %s\n",
                         prefix, s->status_text);
index 54fbe46fa443ded2c0a8120cbb97769d28b57c58..f6a78c403b6a58eb1a8620d2d9f0d0787f475c15 100644 (file)
@@ -180,9 +180,6 @@ struct Service {
         bool bus_name_good:1;
         bool forbid_restart:1;
         bool start_timeout_defined:1;
-#ifdef HAVE_SYSV_COMPAT
-        int sysv_start_priority;
-#endif
 
         char *bus_name;
 
index e6eef315e9b82b4e7f6f373cc873c79b2fcc623e..45c8b4ea0f47de59bfcad41bb261fb243d1d9055 100644 (file)
@@ -174,9 +174,6 @@ static int generate_unit_file(SysvStub *s) {
                 "RemainAfterExit=%s\n",
                 yes_no(!s->pid_file));
 
-        if (s->sysv_start_priority > 0)
-                fprintf(f, "SysVStartPriority=%d\n", s->sysv_start_priority);
-
         if (s->pid_file)
                 fprintf(f, "PIDFile=%s\n", s->pid_file);