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