[systemd-commits] 3 commits - Makefile.am man/systemd-nspawn.xml src/login src/systemd

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sun Jan 27 20:51:16 PST 2013


 Makefile.am               |    2 ++
 man/systemd-nspawn.xml    |   12 ++++++++++++
 src/login/logind-button.c |   26 +++++++++++++++++++++-----
 src/systemd/sd-messages.h |    6 ++++++
 4 files changed, 41 insertions(+), 5 deletions(-)

New commits:
commit 68562936c243a2e2190a7232c4805ffd094e9b3b
Author: William Giokas <1007380 at gmail.com>
Date:   Sat Jan 26 11:15:32 2013 -0600

    man: add Arch Linux entry to systemd-nspawn(5)
    
    Archlinux has a similar tool to debbotstrap in the arch-install-scripts
    package that will install to a specified directory. This is generally
    used for installation, so the -d flag must be passed to tell it to
    install to a non-mountpoint directory.

diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
index 777e0a3..834e2cc 100644
--- a/man/systemd-nspawn.xml
+++ b/man/systemd-nspawn.xml
@@ -321,6 +321,17 @@
         </refsect1>
 
         <refsect1>
+                <title>Example 3</title>
+
+                <programlisting># pacstrap -c -d ~/arch-tree/ base
+# systemd-nspawn -bD ~/arch-tree/</programlisting>
+
+                <para>This installs a mimimal Arch Linux distribution into
+                the directory <filename>~/arch-tree/</filename> and then
+                boots an OS in a namespace container in it.</para>
+        </refsect1>
+
+        <refsect1>
                 <title>Exit status</title>
 
                 <para>The exit code of the program executed in the
@@ -334,6 +345,7 @@
                         <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>yum</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>debootstrap</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>pacman</refentrytitle><manvolnum>8</manvolnum></citerefentry>
                 </para>
         </refsect1>
 

commit 350b6a6560759cbc9903a0f9275e271cd840d6ac
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sun Jan 27 21:23:27 2013 -0500

    build-sys: install two more man aliases

diff --git a/Makefile.am b/Makefile.am
index 9c92bff..faff325 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -637,6 +637,8 @@ MANPAGES_ALIAS = \
 	man/SD_JOURNAL_INVALIDATE.3 \
 	man/sd_journal_add_disjunction.3 \
 	man/sd_journal_flush_matches.3 \
+	man/sd_journal_get_data_threshold.3 \
+	man/sd_journal_set_data_threshold.3 \
 	man/sd_journal_seek_tail.3 \
 	man/sd_journal_seek_monotonic_usec.3 \
 	man/sd_journal_seek_realtime_usec.3 \

commit c485437f50450c0087bae3df4aed462e4a86ee83
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sun Jan 27 21:14:14 2013 -0500

    logind: add MESSAGE_IDs to interesting events

diff --git a/src/login/logind-button.c b/src/login/logind-button.c
index dbf3d3c..cbb067a 100644
--- a/src/login/logind-button.c
+++ b/src/login/logind-button.c
@@ -33,6 +33,7 @@
 #include "logind-button.h"
 #include "special.h"
 #include "dbus-common.h"
+#include "sd-messages.h"
 
 Button* button_new(Manager *m, const char *name) {
         Button *b;
@@ -188,7 +189,10 @@ int button_process(Button *b) {
 
                 case KEY_POWER:
                 case KEY_POWER2:
-                        log_info("Power key pressed.");
+                        log_struct(LOG_INFO,
+                                   "MESSAGE=Power key pressed.",
+                                   MESSAGE_ID(SD_MESSAGE_POWER_KEY),
+                                   NULL);
                         return button_handle(b, INHIBIT_HANDLE_POWER_KEY, b->manager->handle_power_key, b->manager->power_key_ignore_inhibited, true);
 
                 /* The kernel is a bit confused here:
@@ -198,11 +202,17 @@ int button_process(Button *b) {
                 */
 
                 case KEY_SLEEP:
-                        log_info("Suspend key pressed.");
+                        log_struct(LOG_INFO,
+                                   "MESSAGE=Suspend key pressed.",
+                                   MESSAGE_ID(SD_MESSAGE_SUSPEND_KEY),
+                                   NULL);
                         return button_handle(b, INHIBIT_HANDLE_SUSPEND_KEY, b->manager->handle_suspend_key, b->manager->suspend_key_ignore_inhibited, true);
 
                 case KEY_SUSPEND:
-                        log_info("Hibernate key pressed.");
+                        log_struct(LOG_INFO,
+                                   "MESSAGE=Hibernate key pressed.",
+                                   MESSAGE_ID(SD_MESSAGE_HIBERNATE_KEY),
+                                   NULL);
                         return button_handle(b, INHIBIT_HANDLE_HIBERNATE_KEY, b->manager->handle_hibernate_key, b->manager->hibernate_key_ignore_inhibited, true);
                 }
 
@@ -211,7 +221,10 @@ int button_process(Button *b) {
                 switch (ev.code) {
 
                 case SW_LID:
-                        log_info("Lid closed.");
+                        log_struct(LOG_INFO,
+                                   "MESSAGE=Lid closed.",
+                                   MESSAGE_ID(SD_MESSAGE_LID_CLOSED),
+                                   NULL);
                         b->lid_close_queued = true;
 
                         return button_handle(b, INHIBIT_HANDLE_LID_SWITCH, b->manager->handle_lid_switch, b->manager->lid_switch_ignore_inhibited, true);
@@ -222,7 +235,10 @@ int button_process(Button *b) {
                 switch (ev.code) {
 
                 case SW_LID:
-                        log_info("Lid opened.");
+                        log_struct(LOG_INFO,
+                                   "MESSAGE=Lid opened.",
+                                   MESSAGE_ID(SD_MESSAGE_LID_OPENED),
+                                   NULL);
                         b->lid_close_queued = false;
                         break;
                 }
diff --git a/src/systemd/sd-messages.h b/src/systemd/sd-messages.h
index bc56094..92a731d 100644
--- a/src/systemd/sd-messages.h
+++ b/src/systemd/sd-messages.h
@@ -67,6 +67,12 @@ extern "C" {
 
 #define SD_MESSAGE_OVERMOUNTING     SD_ID128_MAKE(1d,ee,03,69,c7,fc,47,36,b7,09,9b,38,ec,b4,6e,e7)
 
+#define SD_MESSAGE_LID_OPENED       SD_ID128_MAKE(b7,2e,a4,a2,88,15,45,a0,b5,0e,20,0e,55,b9,b0,6f)
+#define SD_MESSAGE_LID_CLOSED       SD_ID128_MAKE(b7,2e,a4,a2,88,15,45,a0,b5,0e,20,0e,55,b9,b0,70)
+#define SD_MESSAGE_POWER_KEY        SD_ID128_MAKE(b7,2e,a4,a2,88,15,45,a0,b5,0e,20,0e,55,b9,b0,71)
+#define SD_MESSAGE_SUSPEND_KEY      SD_ID128_MAKE(b7,2e,a4,a2,88,15,45,a0,b5,0e,20,0e,55,b9,b0,72)
+#define SD_MESSAGE_HIBERNATE_KEY    SD_ID128_MAKE(b7,2e,a4,a2,88,15,45,a0,b5,0e,20,0e,55,b9,b0,73)
+
 #ifdef __cplusplus
 }
 #endif



More information about the systemd-commits mailing list