chiark / gitweb /
systemctl: remove "load" command
authorLennart Poettering <lennart@poettering.net>
Fri, 26 Jul 2013 15:05:43 +0000 (17:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 26 Jul 2013 15:05:43 +0000 (17:05 +0200)
"systemctl load" has always been racy since the GC could hit any time,
before making use of the loaded unit. Very recent systemd will run GC
immeidately after all unit state changes which has the effect that the
the effect of "systemctl load" is completely gone now, so let's remove
the support for it in "systemctl" for good.

man/systemctl.xml
src/systemctl/systemctl.c

index 45955da179f3cdb74a6282413df9f170f006c10c..2a23655cfe9663f08fd212bf3cdd1bf498218a9d 100644 (file)
@@ -942,28 +942,6 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
         </listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term><command>load <replaceable>NAME</replaceable>...</command></term>
-
-        <listitem>
-          <para>Load one or more units specified on the command
-          line. This will simply load their configuration from disk,
-          but not start them. To start them, you need to use the
-          <command>start</command> command which will implicitly load
-          a unit that has not been loaded yet. Note that systemd
-          garbage collects loaded units that are not active or
-          referenced by an active unit. This means that units loaded
-          this way will usually not stay loaded for long. Also note
-          that this command cannot be used to reload unit
-          configuration. Use the <command>daemon-reload</command>
-          command for that. All in all, this command is of little use
-          except for debugging.</para>
-
-          <para>This command should not be confused with the
-          <command>daemon-reload</command> or
-          <command>reload</command>.</para>
-        </listitem>
-      </varlistentry>
       <varlistentry>
         <term><command>list-jobs</command></term>
 
index 08981a8002c70ae53286a93c474c1afdb8fa228b..60dee5dc612c77614d8a1761d0e0c62a18465652 100644 (file)
@@ -1388,36 +1388,6 @@ static int list_jobs(DBusConnection *bus, char **args) {
         return 0;
 }
 
-static int load_unit(DBusConnection *bus, char **args) {
-        char **name;
-
-        assert(args);
-
-        STRV_FOREACH(name, args+1) {
-                _cleanup_free_ char *n = NULL;
-                int r;
-
-                n = unit_name_mangle(*name);
-                if (!n)
-                        return log_oom();
-
-                r = bus_method_call_with_reply(
-                                bus,
-                                "org.freedesktop.systemd1",
-                                "/org/freedesktop/systemd1",
-                                "org.freedesktop.systemd1.Manager",
-                                "LoadUnit",
-                                NULL,
-                                NULL,
-                                DBUS_TYPE_STRING, &n,
-                                DBUS_TYPE_INVALID);
-                if (r < 0)
-                        return r;
-        }
-
-        return 0;
-}
-
 static int cancel_job(DBusConnection *bus, char **args) {
         char **name;
 
@@ -4687,7 +4657,6 @@ static int systemctl_help(void) {
                "  help [NAME...|PID...]           Show manual for one or more units\n"
                "  reset-failed [NAME...]          Reset failed state for all, one, or more\n"
                "                                  units\n"
-               "  load [NAME...]                  Load one or more units\n"
                "  list-dependencies [NAME]        Recursively show units which are required\n"
                "                                  or wanted by this unit or by which this\n"
                "                                  unit is required or wanted\n\n"