X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fquotacheck.c;h=e4420eeb1bdf46105c76140f0fe07e73009e398c;hb=68fb08920b2162b48cf0fa8dd98b021327b42896;hp=ba12b27caa269215f50bdc1feabbb12991a609a6;hpb=03aea2aecd6f9d2193af5d6cf866063da8d47ad5;p=elogind.git diff --git a/src/quotacheck.c b/src/quotacheck.c index ba12b27ca..e4420eeb1 100644 --- a/src/quotacheck.c +++ b/src/quotacheck.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ @@ -26,6 +26,7 @@ #include #include "util.h" +#include "virt.h" static bool arg_skip = false; static bool arg_force = false; @@ -53,7 +54,7 @@ static int parse_proc_cmdline(void) { arg_skip = true; else if (startswith(w, "quotacheck.mode")) log_warning("Invalid quotacheck.mode= parameter. Ignoring."); -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) +#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) else if (strneq(w, "forcequotacheck", l)) arg_force = true; #endif @@ -64,8 +65,8 @@ static int parse_proc_cmdline(void) { } static void test_files(void) { -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) - /* This exists only on Fedora or Mandriva */ +#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) + /* This exists only on Fedora, Mandriva or Mageia */ if (access("/forcequotacheck", F_OK) >= 0) arg_force = true; #endif @@ -86,10 +87,12 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); + umask(0022); + parse_proc_cmdline(); test_files();