allow overriding /etc location (LP#1039713), but don’t do it

This commit is contained in:
tg 2012-08-24 19:09:10 +00:00
parent beca8ed86f
commit 84020897fd
2 changed files with 10 additions and 8 deletions

View File

@ -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

13
sh.h
View File

@ -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 */