[systemd-commits] 2 commits - man/hostnamectl.xml shell-completion/bash shell-completion/zsh src/hostname src/systemctl

Lennart Poettering lennart at kemper.freedesktop.org
Thu Nov 6 06:21:06 PST 2014


 man/hostnamectl.xml               |    3 ++-
 shell-completion/bash/hostnamectl |    2 +-
 shell-completion/zsh/_hostnamectl |    2 +-
 src/hostname/hostnamed.c          |    3 ++-
 src/systemctl/systemctl.c         |    9 +++++++--
 5 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 4a3ad39957399c4a30fc472a804e72907ecaa4f9
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Nov 6 15:20:29 2014 +0100

    systemctl: when invokes as "reboot -f", sync()
    
    We do this in the clean shutdown path in shutdown.c, hence we should do
    is for "reboot -f", too.

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 8a3e203..d9e9c2a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7001,8 +7001,13 @@ done:
 
 static int halt_now(enum action a) {
 
-/* Make sure C-A-D is handled by the kernel from this
-         * point on... */
+        /* The kernel will automaticall flush ATA disks and suchlike
+         * on reboot(), but the file systems need to be synce'd
+         * explicitly in advance. */
+        sync();
+
+        /* Make sure C-A-D is handled by the kernel from this point
+         * on... */
         reboot(RB_ENABLE_CAD);
 
         switch (a) {

commit 25fa306ed58b0b7fe30ca9be37c66a7b3b2de70e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Nov 6 14:37:12 2014 +0100

    hostnamed: introduce new "embedded" chassis type
    
    We really don't want to get lost in adding fridge, car, plane, drone, or
    whatever else, hence add a generic term "embedded" cover all the cases
    where the computer is just part of something bigger, and not at the
    focus of things.

diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
index 128d92f..ffae5e6 100644
--- a/man/hostnamectl.xml
+++ b/man/hostnamectl.xml
@@ -217,7 +217,8 @@
                                 <literal>server</literal>,
                                 <literal>tablet</literal>,
                                 <literal>handset</literal>,
-                                <literal>watch</literal>, as well as
+                                <literal>watch</literal>,
+                                <literal>embedded</literal> as well as
                                 the special chassis types
                                 <literal>vm</literal> and
                                 <literal>container</literal> for
diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl
index a5e3460..7a0850d 100644
--- a/shell-completion/bash/hostnamectl
+++ b/shell-completion/bash/hostnamectl
@@ -52,7 +52,7 @@ _hostnamectl() {
         if [[ -z $verb ]]; then
                 comps=${VERBS[*]}
         elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
-                comps='desktop laptop server tablet handset watch vm container'
+                comps='desktop laptop server tablet handset watch embedded vm container'
         elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
                 comps=''
         fi
diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl
index e02f6de..a7217a1 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/shell-completion/zsh/_hostnamectl
@@ -18,7 +18,7 @@ _hostnamectl_set-icon-name() {
 
 _hostnamectl_set-chassis() {
     if (( CURRENT <= 3 )); then
-        _chassis=( desktop laptop server tablet handset watch vm container )
+        _chassis=( desktop laptop server tablet handset watch embedded vm container )
         _describe chassis _chassis
     else
         _message "no more options"
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index a449610..0123922 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -138,7 +138,8 @@ static bool valid_chassis(const char *chassis) {
                         "server\0"
                         "tablet\0"
                         "handset\0"
-                        "watch\0",
+                        "watch\0"
+                        "embedded\0",
                         chassis);
 }
 



More information about the systemd-commits mailing list