chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manager: merge serialization and desrialization counter into one, and increase it...
[elogind.git]
/
src
/
quotacheck.c
diff --git
a/src/quotacheck.c
b/src/quotacheck.c
index a579c5e8b713727cd9c7476dff17dd6b2c1aac0c..ba12b27caa269215f50bdc1feabbb12991a609a6 100644
(file)
--- a/
src/quotacheck.c
+++ b/
src/quotacheck.c
@@
-35,6
+35,9
@@
static int parse_proc_cmdline(void) {
int r;
size_t l;
int r;
size_t l;
+ if (detect_container(NULL) > 0)
+ return 0;
+
if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
return 0;
if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
return 0;
@@
-50,7
+53,7
@@
static int parse_proc_cmdline(void) {
arg_skip = true;
else if (startswith(w, "quotacheck.mode"))
log_warning("Invalid quotacheck.mode= parameter. Ignoring.");
arg_skip = true;
else if (startswith(w, "quotacheck.mode"))
log_warning("Invalid quotacheck.mode= parameter. Ignoring.");
-#if
def TARGET_FEDORA
+#if
defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)
else if (strneq(w, "forcequotacheck", l))
arg_force = true;
#endif
else if (strneq(w, "forcequotacheck", l))
arg_force = true;
#endif
@@
-61,9
+64,9
@@
static int parse_proc_cmdline(void) {
}
static void test_files(void) {
}
static void test_files(void) {
-#if
def TARGET_FEDORA
- /* This exists only on Fedora */
- if (access("/forcequo
at
check", F_OK) >= 0)
+#if
defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)
+ /* This exists only on Fedora
or Mandriva
*/
+ if (access("/forcequo
ta
check", F_OK) >= 0)
arg_force = true;
#endif
}
arg_force = true;
#endif
}
@@
-91,11
+94,10
@@
int main(int argc, char *argv[]) {
test_files();
if (!arg_force) {
test_files();
if (!arg_force) {
-
if (arg_skip)
return 0;
if (arg_skip)
return 0;
- if (access("/
dev/.
systemd/quotacheck", F_OK) < 0)
+ if (access("/
run/
systemd/quotacheck", F_OK) < 0)
return 0;
}
return 0;
}
@@
-108,7
+110,7
@@
int main(int argc, char *argv[]) {
_exit(1); /* Operational error */
}
_exit(1); /* Operational error */
}
- r = wait_for_terminate_and_warn("quotacheck", pid)
>
= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+ r = wait_for_terminate_and_warn("quotacheck", pid)
=
= 0 ? EXIT_SUCCESS : EXIT_FAILURE;
finish:
return r;
finish:
return r;