|
Zbigniew Jędrzejewski-Szmek |
126222 |
From 3d2c847396cf348ef1ee55f5d4211045a6202efc Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
Date: Mon, 30 Dec 2013 13:00:38 -0500
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
Subject: [PATCH] tmpfiles: rename --unsafe to --boot
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
As suggested by Kay, it is better to describe what is done,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
not what might happen.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
man/systemd-tmpfiles.xml | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
man/tmpfiles.d.xml | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
src/tmpfiles/tmpfiles.c | 14 +++++++-------
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
units/systemd-tmpfiles-setup.service.in | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
4 files changed, 11 insertions(+), 11 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
index c678031..64f9cf9 100644
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
--- a/man/systemd-tmpfiles.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+++ b/man/systemd-tmpfiles.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -133,7 +133,7 @@
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
removed.</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<varlistentry>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- <term><option>--unsafe</option></term>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <term><option>--boot</option></term>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<listitem><para>Also execute lines
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
with an exclamation mark.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</para></listitem>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
index ed88751..8267ffc 100644
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
--- a/man/tmpfiles.d.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+++ b/man/tmpfiles.d.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -273,7 +273,7 @@ L /tmp/foobar - - - - /dev/null</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
execute at any time, e.g. on package upgrades.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<command>systemd-tmpfiles</command> will
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
execute line with an exclamation mark only if
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- option <option>--unsafe</option> is given.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ option <option>--boot</option> is given.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<para>For example:
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -286,7 +286,7 @@ r! /tmp/.X[0-9]*-lock
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
The second line in contrast to the first one
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
would break a running system, and will only be
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- executed with <option>--unsafe</option>.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ executed with <option>--boot</option>.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</refsect2>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<refsect2>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
index 30a8a55..4dd1638 100644
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
--- a/src/tmpfiles/tmpfiles.c
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+++ b/src/tmpfiles/tmpfiles.c
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -106,7 +106,7 @@ static Set *unix_sockets = NULL;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
static bool arg_create = false;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
static bool arg_clean = false;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
static bool arg_remove = false;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
-static bool arg_unsafe = false;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+static bool arg_boot = false;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
static char **include_prefixes = NULL;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
static char **exclude_prefixes = NULL;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -1100,7 +1100,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
if (strlen(action) > 2 || (strlen(action) > 1 && action[1] != '!')) {
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
log_error("[%s:%u] Unknown modifier '%s'", fname, line, action);
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
return -EINVAL;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- } else if (strlen(action) > 1 && !arg_unsafe)
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ } else if (strlen(action) > 1 && !arg_boot)
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
type = action[0];
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -1275,7 +1275,7 @@ static int help(void) {
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
" --create Create marked files/directories\n"
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
" --clean Clean up marked directories\n"
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
" --remove Remove marked files/directories\n"
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- " --unsafe Execute actions only safe at boot\n"
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ " --boot Execute actions only safe at boot\n"
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
" --prefix=PATH Only apply rules that apply to paths with the specified prefix\n"
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
" --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n",
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
program_invocation_short_name);
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -1289,7 +1289,7 @@ static int parse_argv(int argc, char *argv[]) {
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
ARG_CREATE,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
ARG_CLEAN,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
ARG_REMOVE,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- ARG_UNSAFE,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ ARG_BOOT,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
ARG_PREFIX,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
ARG_EXCLUDE_PREFIX,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
};
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -1299,7 +1299,7 @@ static int parse_argv(int argc, char *argv[]) {
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
{ "create", no_argument, NULL, ARG_CREATE },
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
{ "clean", no_argument, NULL, ARG_CLEAN },
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
{ "remove", no_argument, NULL, ARG_REMOVE },
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- { "unsafe", no_argument, NULL, ARG_UNSAFE },
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ { "boot", no_argument, NULL, ARG_BOOT },
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
{ "prefix", required_argument, NULL, ARG_PREFIX },
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
{ "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX },
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
{ NULL, 0, NULL, 0 }
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -1330,8 +1330,8 @@ static int parse_argv(int argc, char *argv[]) {
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
arg_remove = true;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
break;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- case ARG_UNSAFE:
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- arg_unsafe = true;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ case ARG_BOOT:
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ arg_boot = true;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
break;
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
case ARG_PREFIX:
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
index c2dcae0..01043b7 100644
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
--- a/units/systemd-tmpfiles-setup.service.in
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+++ b/units/systemd-tmpfiles-setup.service.in
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -24,4 +24,4 @@ RefuseManualStop=yes
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
[Service]
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
Type=oneshot
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
RemainAfterExit=yes
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
-ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --unsafe --exclude-prefix=/dev
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
|