]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Rename suspend-to-hibernate to suspend-then-hibernate
authorMario Limonciello <mario.limonciello@dell.com>
Wed, 28 Mar 2018 16:00:06 +0000 (11:00 -0500)
committerMario Limonciello <mario.limonciello@dell.com>
Wed, 28 Mar 2018 20:11:10 +0000 (15:11 -0500)
Per some discussion with Gnome folks, they would prefer this name
as it's more descriptive of what's happening.

19 files changed:
man/logind.conf.xml
man/rules/meson.build
man/systemd-sleep.conf.xml
man/systemd-suspend.service.xml
man/systemd.special.xml
shell-completion/bash/systemctl.in
shell-completion/zsh/_systemctl.in
src/basic/special.h
src/login/logind-action.c
src/login/logind-action.h
src/login/logind-dbus.c
src/login/org.freedesktop.login1.conf
src/shared/sleep-config.c
src/sleep/sleep.c
src/systemctl/systemctl.c
src/test/test-sleep.c
units/meson.build
units/suspend-then-hibernate.target [moved from units/suspend-to-hibernate.target with 83% similarity]
units/systemd-suspend-then-hibernate.service.in [moved from units/systemd-suspend-to-hibernate.service.in with 88% similarity]

index 25d4d3a1b27d4ab9cfde087d5cd0cf1d05d66a3f..1139c510e7fef91e59c8536cd38f0b675bfab32e 100644 (file)
         <literal>suspend</literal>,
         <literal>hibernate</literal>,
         <literal>hybrid-sleep</literal>,
-        <literal>suspend-to-hibernate</literal>, and
+        <literal>suspend-then-hibernate</literal>, and
         <literal>lock</literal>.
         Defaults to <literal>ignore</literal>.</para>
 
         <literal>suspend</literal>,
         <literal>hibernate</literal>,
         <literal>hybrid-sleep</literal>,
-        <literal>suspend-to-hibernate</literal>, and
+        <literal>suspend-then-hibernate</literal>, and
         <literal>lock</literal>.
         If <literal>ignore</literal>, logind will never handle these
         keys. If <literal>lock</literal>, all running sessions will be
index 878f560681f40536d6c18980601821a7471398ae..1cce1043bffe4f3b876126e3e7ae43a08461a083 100644 (file)
@@ -628,7 +628,7 @@ manpages = [
   '8',
   ['systemd-hibernate.service',
    'systemd-hybrid-sleep.service',
-   'systemd-suspend-to-hibernate.service',
+   'systemd-suspend-then-hibernate.service',
    'systemd-sleep'],
   ''],
  ['systemd-sysctl.service', '8', ['systemd-sysctl'], ''],
index 6ad9ff4b2bf9a000084dd07007cceb76a9bbcffd..3d94a45e4135ee4acbf43b2b0fa84d50ed62cb89 100644 (file)
       </varlistentry>
 
       <varlistentry>
-        <term>suspend-to-hibernate</term>
+        <term>suspend-then-hibernate</term>
 
         <listitem><para>A low power state where the system is initially suspended
         (the state is stored in RAM). If not interrupted within the delay specified by
         <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
-        <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+        <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
         More than one value can be specified by separating
         multiple values with whitespace. They will be tried
         in turn, until one is written without error. If
         <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
         <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
-        <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+        <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
         More than one value can be specified by separating
         multiple values with whitespace. They will be tried
         in turn, until one is written without error. If
         <listitem><para>The amount of time in seconds
         that will pass before the system is automatically
         put into hibernate when using
-        <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+        <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
         </para></listitem>
       </varlistentry>
     </variablelist>
@@ -202,7 +202,7 @@ SuspendState=freeze</programlisting></para>
       <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd-suspend-to-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
     </para>
index 2455baa905c045735d089a63e9e98db996660d1b..8b9a11cb8940d89113577f85c5ee455801614efe 100644 (file)
@@ -50,7 +50,7 @@
     <refname>systemd-suspend.service</refname>
     <refname>systemd-hibernate.service</refname>
     <refname>systemd-hybrid-sleep.service</refname>
-    <refname>systemd-suspend-to-hibernate.service</refname>
+    <refname>systemd-suspend-then-hibernate.service</refname>
     <refname>systemd-sleep</refname>
     <refpurpose>System sleep state logic</refpurpose>
   </refnamediv>
@@ -59,7 +59,7 @@
     <para><filename>systemd-suspend.service</filename></para>
     <para><filename>systemd-hibernate.service</filename></para>
     <para><filename>systemd-hybrid-sleep.service</filename></para>
-    <para><filename>systemd-suspend-to-hibernate.service</filename></para>
+    <para><filename>systemd-suspend-then-hibernate.service</filename></para>
     <para><filename>/usr/lib/systemd/system-sleep</filename></para>
   </refsynopsisdiv>
 
@@ -75,7 +75,7 @@
     <filename>systemd-hybrid-sleep.service</filename> is pulled in by
     <filename>hybrid-sleep.target</filename> to execute hybrid
     hibernation with system suspend and pulled in by
-    <filename>suspend-to-hibernate.target</filename> to execute system suspend
+    <filename>suspend-then-hibernate.target</filename> to execute system suspend
     with a timeout that will activate hibernate later.</para>
 
     <para>Immediately before entering system suspend and/or
@@ -85,7 +85,7 @@
     arguments to them. The first argument will be
     <literal>pre</literal>, the second either
     <literal>suspend</literal>, <literal>hibernate</literal>,
-    <literal>hybrid-sleep</literal>, or <literal>suspend-to-hibernate</literal>
+    <literal>hybrid-sleep</literal>, or <literal>suspend-then-hibernate</literal>
     depending on the chosen action.
     Immediately after leaving system suspend and/or hibernation the
     same executables are run, but the first argument is now
     <filename>systemd-suspend.service</filename>,
     <filename>systemd-hibernate.service</filename>, and
     <filename>systemd-hybrid-sleep.service</filename>
-    <filename>systemd-suspend-to-hibernate.service</filename>
+    <filename>systemd-suspend-then-hibernate.service</filename>
     should never be executed directly. Instead, trigger system sleep
     states with a command such as <literal>systemctl suspend</literal>
     or similar.</para>
         <term><option>suspend</option></term>
         <term><option>hibernate</option></term>
         <term><option>hybrid-sleep</option></term>
-        <term><option>suspend-to-hibernate</option></term>
+        <term><option>suspend-then-hibernate</option></term>
 
-        <listitem><para>Suspend, hibernate, suspend to hibernate, or put the
+        <listitem><para>Suspend, hibernate, suspend then hibernate, or put the
         system to hybrid sleep.</para>
         </listitem>
       </varlistentry>
index 95e2ffc0b53a3632e7adb0380a1c8d3c0061182a..7bf674e9cc29bd8c4410b5f0d5e332caaea8ff3c 100644 (file)
@@ -65,7 +65,7 @@
     <filename>halt.target</filename>,
     <filename>hibernate.target</filename>,
     <filename>hybrid-sleep.target</filename>,
-    <filename>suspend-to-hibernate.target</filename>,
+    <filename>suspend-then-hibernate.target</filename>,
     <filename>initrd-fs.target</filename>,
     <filename>initrd-root-device.target</filename>,
     <filename>initrd-root-fs.target</filename>,
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><filename>suspend-to-hibernate.target</filename></term>
+        <term><filename>suspend-then-hibernate.target</filename></term>
         <listitem>
           <para>A special target unit for suspending the system for a period
           of time, waking it and putting it into hibernate. This pulls in
index de2648a96c2d330e99ce89b00be099ce9c49e73f..c3b97695f1ffe758e8db75b162b53b7f8ccdb535 100644 (file)
@@ -206,7 +206,7 @@ _systemctl () {
                      [ENVS]='set-environment unset-environment import-environment'
                [STANDALONE]='daemon-reexec daemon-reload default
                              emergency exit halt hibernate hybrid-sleep
-                             suspend-to-hibernate kexec list-jobs list-sockets
+                             suspend-then-hibernate kexec list-jobs list-sockets
                              list-timers list-units list-unit-files poweroff
                              reboot rescue show-environment suspend get-default
                              is-system-running preset-all'
index ca0744457bc2f108dd6c534ffbc18c8045412646..6957a848c31bf8099025983fbf0590217e8074a6 100644 (file)
@@ -18,7 +18,7 @@
     "force-reload:Reload one or more units if possible, otherwise restart if active"
     "hibernate:Hibernate the system"
     "hybrid-sleep:Hibernate and suspend the system"
-    "suspend-to-hibernate:Suspend the system for a period of time, and then hibernate it"
+    "suspend-then-hibernate:Suspend the system for a period of time, and then hibernate it"
     "try-reload-or-restart:Reload one or more units if possible, otherwise restart if active"
     "isolate:Start one unit and stop all others"
     "kill:Send signal to processes of a unit"
index 81078ffee9864e5dd3754318fd02086d92818b90..808d8896ae681cb97842be3bed9eec12f6be7564 100644 (file)
@@ -37,7 +37,7 @@
 #define SPECIAL_SUSPEND_TARGET "suspend.target"
 #define SPECIAL_HIBERNATE_TARGET "hibernate.target"
 #define SPECIAL_HYBRID_SLEEP_TARGET "hybrid-sleep.target"
-#define SPECIAL_SUSPEND_TO_HIBERNATE_TARGET "suspend-to-hibernate.target"
+#define SPECIAL_SUSPEND_THEN_HIBERNATE_TARGET "suspend-then-hibernate.target"
 
 /* Special boot targets */
 #define SPECIAL_RESCUE_TARGET "rescue.target"
index 0e8e0b2e4a886569ee713590cd4fb8187aa72022..da38a2c1457fe292cffc77a4c66db2c157555c4f 100644 (file)
@@ -48,7 +48,7 @@ int manager_handle_action(
                 [HANDLE_SUSPEND] = "Suspending...",
                 [HANDLE_HIBERNATE] = "Hibernating...",
                 [HANDLE_HYBRID_SLEEP] = "Hibernating and suspending...",
-                [HANDLE_SUSPEND_TO_HIBERNATE] = "Suspending to hibernate...",
+                [HANDLE_SUSPEND_THEN_HIBERNATE] = "Suspending, then hibernating...",
         };
 
         static const char * const target_table[_HANDLE_ACTION_MAX] = {
@@ -59,7 +59,7 @@ int manager_handle_action(
                 [HANDLE_SUSPEND] = SPECIAL_SUSPEND_TARGET,
                 [HANDLE_HIBERNATE] = SPECIAL_HIBERNATE_TARGET,
                 [HANDLE_HYBRID_SLEEP] = SPECIAL_HYBRID_SLEEP_TARGET,
-                [HANDLE_SUSPEND_TO_HIBERNATE] = SPECIAL_SUSPEND_TO_HIBERNATE_TARGET,
+                [HANDLE_SUSPEND_THEN_HIBERNATE] = SPECIAL_SUSPEND_THEN_HIBERNATE_TARGET,
         };
 
         _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
@@ -112,8 +112,8 @@ int manager_handle_action(
                 supported = can_sleep("hibernate") > 0;
         else if (handle == HANDLE_HYBRID_SLEEP)
                 supported = can_sleep("hybrid-sleep") > 0;
-        else if (handle == HANDLE_SUSPEND_TO_HIBERNATE)
-                supported = can_sleep("suspend-to-hibernate") > 0;
+        else if (handle == HANDLE_SUSPEND_THEN_HIBERNATE)
+                supported = can_sleep("suspend-then-hibernate") > 0;
         else if (handle == HANDLE_KEXEC)
                 supported = access(KEXEC, X_OK) >= 0;
         else
@@ -131,7 +131,7 @@ int manager_handle_action(
 
         inhibit_operation = IN_SET(handle, HANDLE_SUSPEND, HANDLE_HIBERNATE,
                                            HANDLE_HYBRID_SLEEP,
-                                           HANDLE_SUSPEND_TO_HIBERNATE) ? INHIBIT_SLEEP : INHIBIT_SHUTDOWN;
+                                           HANDLE_SUSPEND_THEN_HIBERNATE) ? INHIBIT_SLEEP : INHIBIT_SHUTDOWN;
 
         /* If the actual operation is inhibited, warn and fail */
         if (!ignore_inhibited &&
@@ -178,7 +178,7 @@ static const char* const handle_action_table[_HANDLE_ACTION_MAX] = {
         [HANDLE_SUSPEND] = "suspend",
         [HANDLE_HIBERNATE] = "hibernate",
         [HANDLE_HYBRID_SLEEP] = "hybrid-sleep",
-        [HANDLE_SUSPEND_TO_HIBERNATE] = "suspend-to-hibernate",
+        [HANDLE_SUSPEND_THEN_HIBERNATE] = "suspend-then-hibernate",
         [HANDLE_LOCK] = "lock"
 };
 
index 1ee8c812ffa7010c19b58e576a449538856c5211..9f5dee684cfea1db9230db0d346ff568c8cd860a 100644 (file)
@@ -29,7 +29,7 @@ typedef enum HandleAction {
         HANDLE_SUSPEND,
         HANDLE_HIBERNATE,
         HANDLE_HYBRID_SLEEP,
-        HANDLE_SUSPEND_TO_HIBERNATE,
+        HANDLE_SUSPEND_THEN_HIBERNATE,
         HANDLE_LOCK,
         _HANDLE_ACTION_MAX,
         _HANDLE_ACTION_INVALID = -1
index 7dc8c5a340a01da9632b39627e8f929ef9240bcf..dab4d8aea2292c242ce6d450e643ae971973683c 100644 (file)
@@ -1927,12 +1927,12 @@ static int method_hybrid_sleep(sd_bus_message *message, void *userdata, sd_bus_e
                         error);
 }
 
-static int method_suspend_to_hibernate(sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int method_suspend_then_hibernate(sd_bus_message *message, void *userdata, sd_bus_error *error) {
         Manager *m = userdata;
 
         return method_do_shutdown_or_sleep(
                         m, message,
-                        SPECIAL_SUSPEND_TO_HIBERNATE_TARGET,
+                        SPECIAL_SUSPEND_THEN_HIBERNATE_TARGET,
                         INHIBIT_SLEEP,
                         "org.freedesktop.login1.hibernate",
                         "org.freedesktop.login1.hibernate-multiple-sessions",
@@ -2394,7 +2394,7 @@ static int method_can_hybrid_sleep(sd_bus_message *message, void *userdata, sd_b
                         error);
 }
 
-static int method_can_suspend_to_hibernate(sd_bus_message *message, void *userdata, sd_bus_error *error) {
+static int method_can_suspend_then_hibernate(sd_bus_message *message, void *userdata, sd_bus_error *error) {
         Manager *m = userdata;
 
         return method_can_shutdown_or_sleep(
@@ -2403,7 +2403,7 @@ static int method_can_suspend_to_hibernate(sd_bus_message *message, void *userda
                         "org.freedesktop.login1.hibernate",
                         "org.freedesktop.login1.hibernate-multiple-sessions",
                         "org.freedesktop.login1.hibernate-ignore-inhibit",
-                        "suspend-to-hibernate",
+                        "suspend-then-hibernate",
                         error);
 }
 
@@ -2727,14 +2727,14 @@ const sd_bus_vtable manager_vtable[] = {
         SD_BUS_METHOD("Suspend", "b", NULL, method_suspend, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("Hibernate", "b", NULL, method_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("HybridSleep", "b", NULL, method_hybrid_sleep, SD_BUS_VTABLE_UNPRIVILEGED),
-        SD_BUS_METHOD("SuspendToHibernate", "b", NULL, method_suspend_to_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("SuspendThenHibernate", "b", NULL, method_suspend_then_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CanPowerOff", NULL, "s", method_can_poweroff, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CanReboot", NULL, "s", method_can_reboot, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CanHalt", NULL, "s", method_can_halt, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CanSuspend", NULL, "s", method_can_suspend, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CanHibernate", NULL, "s", method_can_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CanHybridSleep", NULL, "s", method_can_hybrid_sleep, SD_BUS_VTABLE_UNPRIVILEGED),
-        SD_BUS_METHOD("CanSuspendToHibernate", NULL, "s", method_can_suspend_to_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_METHOD("CanSuspendThenHibernate", NULL, "s", method_can_suspend_then_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("ScheduleShutdown", "st", NULL, method_schedule_shutdown, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("CancelScheduledShutdown", NULL, "b", method_cancel_scheduled_shutdown, SD_BUS_VTABLE_UNPRIVILEGED),
         SD_BUS_METHOD("Inhibit", "ssss", "h", method_inhibit, SD_BUS_VTABLE_UNPRIVILEGED),
index 970a217df16d80df13879bdb80d55a7848585ae4..f880f3e2da40257d445786cfb2055c3c461d698d 100644 (file)
 
                 <allow send_destination="org.freedesktop.login1"
                        send_interface="org.freedesktop.login1.Manager"
-                       send_member="SuspendToHibernate"/>
+                       send_member="SuspendThenHibernate"/>
 
                 <allow send_destination="org.freedesktop.login1"
                        send_interface="org.freedesktop.login1.Manager"
 
                 <allow send_destination="org.freedesktop.login1"
                        send_interface="org.freedesktop.login1.Manager"
-                       send_member="CanSuspendToHibernate"/>
+                       send_member="CanSuspendThenHibernate"/>
 
                 <allow send_destination="org.freedesktop.login1"
                        send_interface="org.freedesktop.login1.Manager"
index f65eed87f2f71f7b1f436e29d79b1f086ca92ba7..49531addd5387d75e865e5ca3357bb55d21549db 100644 (file)
@@ -96,13 +96,13 @@ int parse_sleep_config(const char *verb, char ***_modes, char ***_states, usec_t
                 else
                         states = strv_new("disk", NULL);
 
-        } else if (streq(verb, "suspend-to-hibernate"))
+        } else if (streq(verb, "suspend-then-hibernate"))
                 modes = states = NULL;
         else
                 assert_not_reached("what verb");
 
         if ((!modes && STR_IN_SET(verb, "hibernate", "hybrid-sleep")) ||
-            (!states && !streq(verb, "suspend-to-hibernate"))) {
+            (!states && !streq(verb, "suspend-then-hibernate"))) {
                 strv_free(modes);
                 strv_free(states);
                 return log_oom();
@@ -298,9 +298,9 @@ int can_sleep(const char *verb) {
         _cleanup_strv_free_ char **modes = NULL, **states = NULL;
         int r;
 
-        assert(STR_IN_SET(verb, "suspend", "hibernate", "hybrid-sleep", "suspend-to-hibernate"));
+        assert(STR_IN_SET(verb, "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate"));
 
-        if (streq(verb, "suspend-to-hibernate"))
+        if (streq(verb, "suspend-then-hibernate"))
                 return can_s2h();
 
         r = parse_sleep_config(verb, &modes, &states, NULL);
index 48e7c386f3e5114f68d707f274790b8c542df3df..2830b235536c986ffa38097232666151f5dcc2d7 100644 (file)
@@ -224,7 +224,7 @@ static void help(void) {
                "  suspend              Suspend the system\n"
                "  hibernate            Hibernate the system\n"
                "  hybrid-sleep         Both hibernate and suspend the system\n"
-               "  suspend-to-hibernate Initially suspend and then hibernate\n"
+               "  suspend-then-hibernate Initially suspend and then hibernate\n"
                "                       the system after a fixed period of time\n"
                , program_invocation_short_name);
 }
@@ -272,7 +272,7 @@ static int parse_argv(int argc, char *argv[]) {
         if (!streq(arg_verb, "suspend") &&
             !streq(arg_verb, "hibernate") &&
             !streq(arg_verb, "hybrid-sleep") &&
-            !streq(arg_verb, "suspend-to-hibernate")) {
+            !streq(arg_verb, "suspend-then-hibernate")) {
                 log_error("Unknown command '%s'.", arg_verb);
                 return -EINVAL;
         }
@@ -297,7 +297,7 @@ int main(int argc, char *argv[]) {
         if (r < 0)
                 goto finish;
 
-        if (streq(arg_verb, "suspend-to-hibernate"))
+        if (streq(arg_verb, "suspend-then-hibernate"))
                 r = execute_s2h(delay);
         else
                 r = execute(modes, states);
index 9bad0362e1d92f30c7d3df926e30e39d76f7d74a..43ca19d014ea78059a4e44c7bd524ba4104b29ee 100644 (file)
@@ -161,7 +161,7 @@ static enum action {
         ACTION_SUSPEND,
         ACTION_HIBERNATE,
         ACTION_HYBRID_SLEEP,
-        ACTION_SUSPEND_TO_HIBERNATE,
+        ACTION_SUSPEND_THEN_HIBERNATE,
         ACTION_RUNLEVEL2,
         ACTION_RUNLEVEL3,
         ACTION_RUNLEVEL4,
@@ -3019,22 +3019,22 @@ static const struct {
         const char *verb;
         const char *mode;
 } action_table[_ACTION_MAX] = {
-        [ACTION_HALT]                 = { SPECIAL_HALT_TARGET,                 "halt",                 "replace-irreversibly" },
-        [ACTION_POWEROFF]             = { SPECIAL_POWEROFF_TARGET,             "poweroff",             "replace-irreversibly" },
-        [ACTION_REBOOT]               = { SPECIAL_REBOOT_TARGET,               "reboot",               "replace-irreversibly" },
-        [ACTION_KEXEC]                = { SPECIAL_KEXEC_TARGET,                "kexec",                "replace-irreversibly" },
-        [ACTION_RUNLEVEL2]            = { SPECIAL_MULTI_USER_TARGET,           NULL,                   "isolate" },
-        [ACTION_RUNLEVEL3]            = { SPECIAL_MULTI_USER_TARGET,           NULL,                   "isolate" },
-        [ACTION_RUNLEVEL4]            = { SPECIAL_MULTI_USER_TARGET,           NULL,                   "isolate" },
-        [ACTION_RUNLEVEL5]            = { SPECIAL_GRAPHICAL_TARGET,            NULL,                   "isolate" },
-        [ACTION_RESCUE]               = { SPECIAL_RESCUE_TARGET,               "rescue",               "isolate" },
-        [ACTION_EMERGENCY]            = { SPECIAL_EMERGENCY_TARGET,            "emergency",            "isolate" },
-        [ACTION_DEFAULT]              = { SPECIAL_DEFAULT_TARGET,              "default",              "isolate" },
-        [ACTION_EXIT]                 = { SPECIAL_EXIT_TARGET,                 "exit",                 "replace-irreversibly" },
-        [ACTION_SUSPEND]              = { SPECIAL_SUSPEND_TARGET,              "suspend",              "replace-irreversibly" },
-        [ACTION_HIBERNATE]            = { SPECIAL_HIBERNATE_TARGET,            "hibernate",            "replace-irreversibly" },
-        [ACTION_HYBRID_SLEEP]         = { SPECIAL_HYBRID_SLEEP_TARGET,         "hybrid-sleep",         "replace-irreversibly" },
-        [ACTION_SUSPEND_TO_HIBERNATE] = { SPECIAL_SUSPEND_TO_HIBERNATE_TARGET, "suspend-to-hibernate", "replace-irreversibly" },
+        [ACTION_HALT]                 = { SPECIAL_HALT_TARGET,                     "halt",                   "replace-irreversibly" },
+        [ACTION_POWEROFF]             = { SPECIAL_POWEROFF_TARGET,                 "poweroff",               "replace-irreversibly" },
+        [ACTION_REBOOT]               = { SPECIAL_REBOOT_TARGET,                   "reboot",                 "replace-irreversibly" },
+        [ACTION_KEXEC]                = { SPECIAL_KEXEC_TARGET,                    "kexec",                  "replace-irreversibly" },
+        [ACTION_RUNLEVEL2]            = { SPECIAL_MULTI_USER_TARGET,               NULL,                     "isolate" },
+        [ACTION_RUNLEVEL3]            = { SPECIAL_MULTI_USER_TARGET,               NULL,                     "isolate" },
+        [ACTION_RUNLEVEL4]            = { SPECIAL_MULTI_USER_TARGET,               NULL,                     "isolate" },
+        [ACTION_RUNLEVEL5]            = { SPECIAL_GRAPHICAL_TARGET,                NULL,                     "isolate" },
+        [ACTION_RESCUE]               = { SPECIAL_RESCUE_TARGET,                   "rescue",                 "isolate" },
+        [ACTION_EMERGENCY]            = { SPECIAL_EMERGENCY_TARGET,                "emergency",              "isolate" },
+        [ACTION_DEFAULT]              = { SPECIAL_DEFAULT_TARGET,                  "default",                "isolate" },
+        [ACTION_EXIT]                 = { SPECIAL_EXIT_TARGET,                     "exit",                   "replace-irreversibly" },
+        [ACTION_SUSPEND]              = { SPECIAL_SUSPEND_TARGET,                  "suspend",                "replace-irreversibly" },
+        [ACTION_HIBERNATE]            = { SPECIAL_HIBERNATE_TARGET,                "hibernate",              "replace-irreversibly" },
+        [ACTION_HYBRID_SLEEP]         = { SPECIAL_HYBRID_SLEEP_TARGET,             "hybrid-sleep",           "replace-irreversibly" },
+        [ACTION_SUSPEND_THEN_HIBERNATE] = { SPECIAL_SUSPEND_THEN_HIBERNATE_TARGET, "suspend-then-hibernate", "replace-irreversibly" },
 };
 
 static enum action verb_to_action(const char *verb) {
@@ -3269,8 +3269,8 @@ static int logind_reboot(enum action a) {
                 description = "put system into hybrid sleep";
                 break;
 
-        case ACTION_SUSPEND_TO_HIBERNATE:
-                method = "SuspendToHibernate";
+        case ACTION_SUSPEND_THEN_HIBERNATE:
+                method = "SuspendThenHibernate";
                 description = "put system into suspend followed by hibernate";
                 break;
 
@@ -3643,7 +3643,7 @@ static int start_special(int argc, char *argv[], void *userdata) {
                            ACTION_SUSPEND,
                            ACTION_HIBERNATE,
                            ACTION_HYBRID_SLEEP,
-                           ACTION_SUSPEND_TO_HIBERNATE)) {
+                           ACTION_SUSPEND_THEN_HIBERNATE)) {
 
                         r = logind_reboot(a);
                         if (r >= 0)
@@ -7185,7 +7185,7 @@ static void systemctl_help(void) {
                "  suspend                             Suspend the system\n"
                "  hibernate                           Hibernate the system\n"
                "  hybrid-sleep                        Hibernate and suspend the system\n"
-               "  suspend-to-hibernate                Suspend the system, wake after a period of\n"
+               "  suspend-then-hibernate              Suspend the system, wake after a period of\n"
                "                                      time and put it into hibernate\n",
                program_invocation_short_name);
 }
@@ -8283,7 +8283,7 @@ static int systemctl_main(int argc, char *argv[]) {
                 { "suspend",               VERB_ANY, 1,        VERB_ONLINE_ONLY, start_system_special },
                 { "hibernate",             VERB_ANY, 1,        VERB_ONLINE_ONLY, start_system_special },
                 { "hybrid-sleep",          VERB_ANY, 1,        VERB_ONLINE_ONLY, start_system_special },
-                { "suspend-to-hibernate",  VERB_ANY, 1,        VERB_ONLINE_ONLY, start_system_special },
+                { "suspend-then-hibernate",VERB_ANY, 1,        VERB_ONLINE_ONLY, start_system_special },
                 { "default",               VERB_ANY, 1,        VERB_ONLINE_ONLY, start_special        },
                 { "rescue",                VERB_ANY, 1,        VERB_ONLINE_ONLY, start_system_special },
                 { "emergency",             VERB_ANY, 1,        VERB_ONLINE_ONLY, start_system_special },
@@ -8615,7 +8615,7 @@ int main(int argc, char*argv[]) {
         case ACTION_SUSPEND:
         case ACTION_HIBERNATE:
         case ACTION_HYBRID_SLEEP:
-        case ACTION_SUSPEND_TO_HIBERNATE:
+        case ACTION_SUSPEND_THEN_HIBERNATE:
         case ACTION_EMERGENCY:
         case ACTION_DEFAULT:
                 /* systemctl verbs with no equivalent in the legacy commands.
index e49ecbe4947d62dc84e7b3b40246bacdad474c3d..cea511d8b8bc9334c1e99fe434e7488d85649e34 100644 (file)
@@ -48,7 +48,7 @@ static void test_sleep(void) {
         log_info("Suspend configured and possible: %s", yes_no(can_sleep("suspend") > 0));
         log_info("Hibernation configured and possible: %s", yes_no(can_sleep("hibernate") > 0));
         log_info("Hybrid-sleep configured and possible: %s", yes_no(can_sleep("hybrid-sleep") > 0));
-        log_info("Suspend-to-Hibernate configured and possible: %s", yes_no(can_sleep("suspend-to-hibernate") > 0));
+        log_info("Suspend-then-Hibernate configured and possible: %s", yes_no(can_sleep("suspend-then-hibernate") > 0));
 }
 
 int main(int argc, char* argv[]) {
index 7977d076905c64048dc74422439294e789ad002d..344c7d235eafec79b9affa58a2569447708ef338 100644 (file)
@@ -36,7 +36,7 @@ units = [
         ['halt.target',                         ''],
         ['hibernate.target',                    'ENABLE_HIBERNATE'],
         ['hybrid-sleep.target',                 'ENABLE_HIBERNATE'],
-        ['suspend-to-hibernate.target',         'ENABLE_HIBERNATE'],
+        ['suspend-then-hibernate.target',         'ENABLE_HIBERNATE'],
         ['initrd-fs.target',                    ''],
         ['initrd-root-device.target',           ''],
         ['initrd-root-fs.target',               ''],
@@ -156,7 +156,7 @@ in_units = [
         ['systemd-hibernate-resume@.service',    'ENABLE_HIBERNATE'],
         ['systemd-hibernate.service',            'ENABLE_HIBERNATE'],
         ['systemd-hybrid-sleep.service',         'ENABLE_HIBERNATE'],
-        ['systemd-suspend-to-hibernate.service', 'ENABLE_HIBERNATE'],
+        ['systemd-suspend-then-hibernate.service', 'ENABLE_HIBERNATE'],
         ['systemd-hostnamed.service',            'ENABLE_HOSTNAMED',
          'dbus-org.freedesktop.hostname1.service'],
         ['systemd-hwdb-update.service',          'ENABLE_HWDB',
similarity index 83%
rename from units/suspend-to-hibernate.target
rename to units/suspend-then-hibernate.target
index b9ab6d19e1bc2afdf00a7903078c1af6e2a19e68..8c4551009532666345cbc354d6697feeccdbbc3c 100644 (file)
@@ -11,6 +11,6 @@
 Description=Suspend; Idle into hibernate
 Documentation=man:systemd.special(7)
 DefaultDependencies=no
-Requires=systemd-suspend-to-hibernate.service
-After=systemd-suspend-to-hibernate.service
+Requires=systemd-suspend-then-hibernate.service
+After=systemd-suspend-then-hibernate.service
 StopWhenUnneeded=yes
similarity index 88%
rename from units/systemd-suspend-to-hibernate.service.in
rename to units/systemd-suspend-then-hibernate.service.in
index 9bec9f6269a383fa42d593850c313457d6172029..441ff164a02b6e72c10c1f356198cfe513ae1ade 100644 (file)
@@ -16,4 +16,4 @@ After=sleep.target
 
 [Service]
 Type=oneshot
-ExecStart=@rootlibexecdir@/systemd-sleep suspend-to-hibernate
+ExecStart=@rootlibexecdir@/systemd-sleep suspend-then-hibernate