Whamcloud - gitweb
Add E2FSCK_CONFIG environment variable
authorTheodore Ts'o <tytso@mit.edu>
Sat, 31 Dec 2005 21:21:00 +0000 (16:21 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 31 Dec 2005 21:21:00 +0000 (16:21 -0500)
Also, use this environtment variable to make sure that a local
/etc/e2fsck.conf file will not interfere with the regression test
suite.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/unix.c
tests/test_config

index bb19727..708c255 100644 (file)
@@ -563,6 +563,7 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
        struct sigaction        sa;
 #endif
        char            *extended_opts = 0;
+       char            *cp;
 
        retval = e2fsck_allocate_context(&ctx);
        if (retval)
@@ -734,6 +735,8 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
        if (extended_opts)
                parse_extended_opts(ctx, extended_opts);
 
+       if ((cp = getenv("E2FSCK_CONFIG")) != NULL)
+               config_fn[0] = cp;
        profile_init(config_fn, &ctx->profile);
 
        if (flush) {
index cb4e2f7..d021fef 100644 (file)
@@ -25,3 +25,5 @@ export TZ
 LANG=C
 export LANG
 unset PAGER
+E2FSCK_CONFIG=/dev/null
+export E2FSCK_CONFIG