X-Git-Url: https://git.tld-linux.org/?p=packages%2Fmksh.git;a=blobdiff_plain;f=mksh-mkshrc_support.patch;h=38baf33fc1117a5c8071c7828bdc0b9549266fd0;hp=a653979dc513ce708ed77027d4b00091d4eed5a0;hb=fc8d3c2524144d640323cdf1aa7c51bf032ad5bf;hpb=5a2b33e1e24f11b9ead84554444f9210d1b85211 diff --git a/mksh-mkshrc_support.patch b/mksh-mkshrc_support.patch index a653979..38baf33 100644 --- a/mksh-mkshrc_support.patch +++ b/mksh-mkshrc_support.patch @@ -1,19 +1,20 @@ ---- main.c~ 2011-07-07 18:15:26.961632040 +0100 -+++ main.c 2011-07-07 18:15:50.664694256 +0100 -@@ -532,10 +532,14 @@ - char *env_file; - - /* include $ENV */ -- env_file = substitute(substitute("${ENV:-" MKSHRC_PATH "}", 0), -- DOTILDE); -+ env_file = substitute(substitute("${ENV}", 0), DOTILDE); - if (*env_file != '\0') - include(env_file, 0, NULL, true); -+ else { -+ env_file = substitute(MKSHRC_PATH, DOTILDE); -+ include("/etc/mkshrc", 0, NULL, true); -+ include(env_file, 0, NULL, true); -+ } - } - - if (restricted) { +diff -urp mksh.orig/main.c mksh/main.c +--- mksh.orig/main.c 2016-08-04 20:52:01.000000000 +0000 ++++ mksh/main.c 2016-08-18 06:47:50.115554000 +0000 +@@ -611,10 +611,14 @@ main_init(int argc, const char *argv[], + if (Flag(FLOGIN)) + include(substitute("$HOME/.profile", 0), 0, NULL, true); + if (Flag(FTALKING)) { +- cp = substitute(substitute("${ENV:-" MKSHRC_PATH "}", +- 0), DOTILDE); ++ cp = substitute(substitute("${ENV}", 0), DOTILDE); + if (cp[0] != '\0') + include(cp, 0, NULL, true); ++ else { ++ cp = substitute(MKSHRC_PATH, DOTILDE); ++ include("/etc/mkshrc", 0, NULL, true); ++ include(cp, 0, NULL, true); ++ } + } + } else { + include(MKSH_SUID_PROFILE, 0, NULL, true);