From 84020897fd905a3fc124bfbf3fbd1becf7008d59 Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 24 Aug 2012 19:09:10 +0000 Subject: [PATCH] =?UTF-8?q?allow=20overriding=20/etc=20location=20(LP#1039?= =?UTF-8?q?713),=20but=20don=E2=80=99t=20do=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.sh | 5 +++-- sh.h | 13 +++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Build.sh b/Build.sh index 52f5f40..003737f 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.580 2012/08/03 18:16:43 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.581 2012/08/24 19:09:09 tg Exp $' #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 @@ -1487,7 +1487,7 @@ else #define EXTERN #define MKSH_INCLUDES_ONLY #include "sh.h" - __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.580 2012/08/03 18:16:43 tg Exp $"); + __RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.581 2012/08/24 19:09:09 tg Exp $"); int main(void) { printf("Hello, World!\n"); return (0); } EOF case $cm in @@ -2272,6 +2272,7 @@ MKSH_CLRTOEOL_STRING "\033[K" MKSH_CLS_STRING "\033[;H\033[J" MKSH_CONSERVATIVE_FDS fd 0-9 for scripts, shell only up to 31 MKSH_DEFAULT_EXECSHELL "/bin/sh" (do not change) +MKSH_DEFAULT_PROFILEDIR "/etc" (do not change) MKSH_DEFAULT_TMPDIR "/tmp" (do not change) MKSH_DISABLE_DEPRECATED disable code paths scheduled for later removal MKSH_DISABLE_TTY_WARNING shut up warning about ctty if OS cant be fixed diff --git a/sh.h b/sh.h index f161726..549db4f 100644 --- a/sh.h +++ b/sh.h @@ -157,7 +157,7 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.579 2012/08/24 19:02:57 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.580 2012/08/24 19:09:10 tg Exp $"); #endif #define MKSH_VERSION "R40 2012/08/17" @@ -959,15 +959,16 @@ EXTERN mksh_ari_t x_lins E_INIT(24); /* tty lines */ /* Determine the location of the system (common) profile */ -/* This is deliberately not configurable via CPPFLAGS */ +#ifndef MKSH_DEFAULT_PROFILEDIR #if defined(ANDROID) -#define MKSH_ETC_LOCATION "/system/etc" +#define MKSH_DEFAULT_PROFILEDIR "/system/etc" #else -#define MKSH_ETC_LOCATION "/etc" +#define MKSH_DEFAULT_PROFILEDIR "/etc" +#endif #endif -#define MKSH_SYSTEM_PROFILE MKSH_ETC_LOCATION "/profile" -#define MKSH_SUID_PROFILE MKSH_ETC_LOCATION "/suid_profile" +#define MKSH_SYSTEM_PROFILE MKSH_DEFAULT_PROFILEDIR "/profile" +#define MKSH_SUID_PROFILE MKSH_DEFAULT_PROFILEDIR "/suid_profile" /* Used by v_evaluate() and setstr() to control action when error occurs */