diff -Naur glibc-2.23/elf/dl-cache.c nglibc-2.23/elf/dl-cache.c
--- a/elf/dl-cache.c	2018-01-30 17:42:50.748333413 +0300
+++ b/elf/dl-cache.c	2018-01-30 17:33:21.476341865 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 1996-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/elf/dl-load.c nglibc-2.23/elf/dl-load.c
--- a/elf/dl-load.c	2018-01-30 17:42:50.692333414 +0300
+++ b/elf/dl-load.c	2018-01-30 17:33:21.412341866 +0300
@@ -2120,7 +2120,7 @@
 	      || ! __libc_enable_secure)
 	  && __glibc_likely (GLRO(dl_inhibit_cache) == 0))
 	{
-	  /* Check the list of libraries in the file /etc/ld.so.cache,
+	  /* Check the list of libraries in the file /opt/etc/ld.so.cache,
 	     for compatibility with Linux's ldconfig program.  */
 	  char *cached = _dl_load_cache_lookup (name);
 
diff -Naur glibc-2.23/elf/dl-support.c nglibc-2.23/elf/dl-support.c
--- a/elf/dl-support.c	2016-02-18 20:54:00.000000000 +0300
+++ b/elf/dl-support.c	2018-01-25 16:55:55.000000000 +0300
@@ -354,7 +354,7 @@
 	  cp = (const char *) __rawmemchr (cp, '\0') + 1;
 	}
 
-      if (__access ("/etc/suid-debug", F_OK) != 0)
+      if (__access ("/opt/etc/suid-debug", F_OK) != 0)
 	__unsetenv ("MALLOC_CHECK_");
     }
 
diff -Naur glibc-2.23/elf/rtld.c nglibc-2.23/elf/rtld.c
--- a/elf/rtld.c	2018-01-30 17:42:50.748333413 +0300
+++ b/elf/rtld.c	2018-01-30 17:33:21.476341865 +0300
@@ -1474,7 +1474,7 @@
     }
 
   /* We have two ways to specify objects to preload: via environment
-     variable and via the file /etc/ld.so.preload.  The latter can also
+     variable and via the file /opt/etc/ld.so.preload.  The latter can also
      be used when security is enabled.  */
   assert (*first_preload == NULL);
   struct link_map **preloads = NULL;
@@ -2528,7 +2528,7 @@
 	}
       while (*nextp != '\0');
 
-      if (__access ("/etc/suid-debug", F_OK) != 0)
+      if (__access ("/opt/etc/suid-debug", F_OK) != 0)
 	{
 	  unsetenv ("MALLOC_CHECK_");
 	  GLRO(dl_debug_mask) = 0;
diff -Naur glibc-2.23/hesiod/hesiod.c nglibc-2.23/hesiod/hesiod.c
--- a/hesiod/hesiod.c	2016-02-18 20:54:00.000000000 +0300
+++ b/hesiod/hesiod.c	2018-01-25 16:58:36.000000000 +0300
@@ -48,7 +48,7 @@
 #include "hesiod_p.h"
 #undef DEF_RHS
 
-#define _PATH_HESIOD_CONF "/etc/hesiod.conf"
+#define _PATH_HESIOD_CONF "/opt/etc/hesiod.conf"
 
 /* Forward */
 
@@ -257,7 +257,7 @@
 }
 
 /*
- * This function parses the /etc/hesiod.conf file
+ * This function parses the /opt/etc/hesiod.conf file
  */
 static int
 parse_config_file(struct hesiod_p *ctx, const char *filename) {
diff -Naur glibc-2.23/hesiod/nss_hesiod/hesiod-proto.c nglibc-2.23/hesiod/nss_hesiod/hesiod-proto.c
--- a/hesiod/nss_hesiod/hesiod-proto.c	2016-02-18 20:54:00.000000000 +0300
+++ b/hesiod/nss_hesiod/hesiod-proto.c	2018-01-25 17:02:00.000000000 +0300
@@ -28,7 +28,7 @@
 #include "nss_hesiod.h"
 
 /* Declare a parser for Hesiod protocol entries.  Although the format
-   of the entries is identical to those in /etc/protocols, here is no
+   of the entries is identical to those in /opt/etc/protocols, here is no
    predefined parser for us to use.  */
 
 #define ENTNAME protoent
diff -Naur glibc-2.23/Makeconfig nglibc-2.23/Makeconfig
--- a/Makeconfig	2018-01-30 17:42:50.744333413 +0300
+++ b/Makeconfig	2018-01-30 17:55:37.496322029 +0300
@@ -270,7 +270,7 @@
 # other than there, so the zoneinfo directory contains only universal data,
 # localizing the configuration data elsewhere.
 ifndef localtime-file
-localtime-file = $(sysconfdir)/localtime
+localtime-file = /opt$(sysconfdir)/localtime
 endif
 
 # What to use for leap second specifications in compiling the default
diff -Naur glibc-2.23/manual/filesys.texi nglibc-2.23/manual/filesys.texi
--- a/manual/filesys.texi	2016-02-18 20:54:00.000000000 +0300
+++ b/manual/filesys.texi	2018-01-24 19:05:55.000000000 +0300
@@ -2755,7 +2755,7 @@
 user.  One possible solution is to set the setuid-bit of the program
 file.  If such a program is started the @emph{effective} user ID of the
 process is changed to that of the owner of the program file.  So to
-allow write access to files like @file{/etc/passwd}, which normally can
+allow write access to files like @file{/opt/etc/passwd}, which normally can
 be written only by the super-user, the modifying program will have to be
 owned by @code{root} and the setuid-bit must be set.
 
diff -Naur glibc-2.23/manual/install.texi nglibc-2.23/manual/install.texi
--- a/manual/install.texi	2016-02-18 20:54:00.000000000 +0300
+++ b/manual/install.texi	2018-01-24 19:05:32.000000000 +0300
@@ -253,7 +253,7 @@
 
 Before reporting bugs make sure there is no problem with your system.
 The tests (and later installation) use some pre-existing files of the
-system such as @file{/etc/passwd}, @file{/etc/nsswitch.conf} and others.
+system such as @file{/opt/etc/passwd}, @file{/etc/nsswitch.conf} and others.
 These files must all contain correct and sensible content.
 
 Normally, @code{make check} will run all the tests before reporting
diff -Naur glibc-2.23/manual/nss.texi nglibc-2.23/manual/nss.texi
--- a/manual/nss.texi	2016-02-18 20:54:00.000000000 +0300
+++ b/manual/nss.texi	2018-01-24 19:05:41.000000000 +0300
@@ -7,7 +7,7 @@
 
 Various functions in the C Library need to be configured to work
 correctly in the local environment.  Traditionally, this was done by
-using files (e.g., @file{/etc/passwd}), but other nameservices (like the
+using files (e.g., @file{/opt/etc/passwd}), but other nameservices (like the
 Network Information Service (NIS) and the Domain Name Service (DNS))
 became popular, and were hacked into the C library, usually with a fixed
 search order.
diff -Naur glibc-2.23/manual/socket.texi nglibc-2.23/manual/socket.texi
--- a/manual/socket.texi	2016-02-18 20:54:00.000000000 +0300
+++ b/manual/socket.texi	2018-01-24 19:16:24.000000000 +0300
@@ -1255,11 +1255,11 @@
 @samp{alpha.gnu.org}; and other machines in the @samp{gnu.org}
 domain can refer to it simply as @samp{alpha}.
 
-@pindex /etc/hosts
+@pindex /opt/etc/hosts
 @pindex netdb.h
 Internally, the system uses a database to keep track of the mapping
 between host names and host numbers.  This database is usually either
-the file @file{/etc/hosts} or an equivalent provided by a name server.
+the file @file{/opt/etc/hosts} or an equivalent provided by a name server.
 The functions and other symbols for accessing this database are declared
 in @file{netdb.h}.  They are BSD features, defined unconditionally if
 you include @file{netdb.h}.
diff -Naur glibc-2.23/manual/startup.texi nglibc-2.23/manual/startup.texi
--- a/manual/startup.texi	2016-02-18 20:54:00.000000000 +0300
+++ b/manual/startup.texi	2018-01-24 19:06:56.000000000 +0300
@@ -761,7 +761,7 @@
 
 int rc;
 
-rc = syscall(SYS_chmod, "/etc/passwd", 0444);
+rc = syscall(SYS_chmod, "/opt/etc/passwd", 0444);
 
 if (rc == -1)
    fprintf(stderr, "chmod failed, errno = %d\n", errno);
@@ -781,7 +781,7 @@
 
 int rc;
 
-rc = chmod("/etc/passwd", 0444);
+rc = chmod("/opt/etc/passwd", 0444);
 if (rc == -1)
    fprintf(stderr, "chmod failed, errno = %d\n", errno);
 
diff -Naur glibc-2.23/manual/sysinfo.texi nglibc-2.23/manual/sysinfo.texi
--- a/manual/sysinfo.texi	2016-02-18 20:54:00.000000000 +0300
+++ b/manual/sysinfo.texi	2018-01-24 19:16:11.000000000 +0300
@@ -212,7 +212,7 @@
 The proper way to establish the primary IP address of a system
 is to configure the IP address resolver to associate that IP address with
 the system's host name as returned by @code{gethostname}.  For example,
-put a record for the system in @file{/etc/hosts}.
+put a record for the system in @file{/opt/etc/hosts}.
 
 See @code{gethostid} above for more information on host ids.
 
diff -Naur glibc-2.23/manual/users.texi nglibc-2.23/manual/users.texi
--- a/manual/users.texi	2016-02-18 20:54:00.000000000 +0300
+++ b/manual/users.texi	2018-01-24 19:10:12.000000000 +0300
@@ -1805,10 +1805,10 @@
 @section User Database
 @cindex user database
 @cindex password database
-@pindex /etc/passwd
+@pindex /opt/etc/passwd
 
 This section describes how to search and scan the database of registered
-users.  The database itself is kept in the file @file{/etc/passwd} on
+users.  The database itself is kept in the file @file{/opt/etc/passwd} on
 most systems, but on some systems a special network server gives access
 to it.
 
@@ -2337,11 +2337,11 @@
 @node Group Database
 @section Group Database
 @cindex group database
-@pindex /etc/group
+@pindex /opt/etc/group
 
 This section describes how to search and scan the database of
 registered groups.  The database itself is kept in the file
-@file{/etc/group} on most systems, but on some systems a special network
+@file{/opt/etc/group} on most systems, but on some systems a special network
 service provides access to it.
 
 @menu
diff -Naur glibc-2.23/misc/fstab.h nglibc-2.23/misc/fstab.h
--- a/misc/fstab.h	2016-02-18 20:54:00.000000000 +0300
+++ b/misc/fstab.h	2018-01-25 16:47:55.000000000 +0300
@@ -45,8 +45,8 @@
  * if type is "rq", then use concatenation of fs_file and "quotas" to locate
  * quota file.
  */
-#define	_PATH_FSTAB	"/etc/fstab"
-#define	FSTAB		"/etc/fstab"	/* deprecated */
+#define	_PATH_FSTAB	"/opt/etc/fstab"
+#define	FSTAB		"/opt/etc/fstab"	/* deprecated */
 
 #define	FSTAB_RW	"rw"		/* read/write device */
 #define	FSTAB_RQ	"rq"		/* read/write with quotas */
diff -Naur glibc-2.23/misc/getusershell.c nglibc-2.23/misc/getusershell.c
--- a/misc/getusershell.c	2016-02-18 20:54:00.000000000 +0300
+++ b/misc/getusershell.c	2018-01-24 19:12:05.000000000 +0300
@@ -43,7 +43,7 @@
 
 /*
  * Local shells should NOT be added here.  They should be added in
- * /etc/shells.
+ * /opt/etc/shells.
  */
 
 /* NB: we do not initialize okshells here.  The initialization needs
diff -Naur glibc-2.23/misc/sysexits.h nglibc-2.23/misc/sysexits.h
--- a/misc/sysexits.h	2016-02-18 20:54:00.000000000 +0300
+++ b/misc/sysexits.h	2018-01-25 16:47:36.000000000 +0300
@@ -71,7 +71,7 @@
  *		fork", "cannot create pipe", or the like.  It includes
  *		things like getuid returning a user that does not
  *		exist in the passwd file.
- *	EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
+ *	EX_OSFILE -- Some system file (e.g., /opt/etc/passwd, /opt/etc/utmp,
  *		etc.) does not exist, cannot be opened, or has some
  *		sort of error (e.g., syntax error).
  *	EX_CANTCREAT -- A (user specified) output file cannot be
diff -Naur glibc-2.23/misc/ttyent.h nglibc-2.23/misc/ttyent.h
--- a/misc/ttyent.h	2016-02-18 20:54:00.000000000 +0300
+++ b/misc/ttyent.h	2018-01-25 16:48:03.000000000 +0300
@@ -34,7 +34,7 @@
 
 #include <features.h>
 
-#define	_PATH_TTYS	"/etc/ttys"
+#define	_PATH_TTYS	"/opt/etc/ttys"
 
 #define	_TTYS_OFF	"off"
 #define	_TTYS_ON	"on"
diff -Naur glibc-2.23/nis/nss_compat/compat-grp.c nglibc-2.23/nis/nss_compat/compat-grp.c
--- a/nis/nss_compat/compat-grp.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nis/nss_compat/compat-grp.c	2018-01-24 19:10:31.000000000 +0300
@@ -120,7 +120,7 @@
 
   if (ent->stream == NULL)
     {
-      ent->stream = fopen ("/etc/group", "rme");
+      ent->stream = fopen ("/opt/etc/group", "rme");
 
       if (ent->stream == NULL)
 	status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
@@ -254,7 +254,7 @@
   return NSS_STATUS_SUCCESS;
 }
 
-/* This function handle the +group entrys in /etc/group */
+/* This function handle the +group entrys in /opt/etc/group */
 static enum nss_status
 getgrnam_plusgroup (const char *name, struct group *result, ent_t *ent,
 		    char *buffer, size_t buflen, int *errnop)
@@ -346,7 +346,7 @@
 	  enum nss_status status;
 
 	  /* Store the group in the blacklist for the "+" at the end of
-	     /etc/group */
+	     /opt/etc/group */
 	  memcpy (buf, &result->gr_name[1], len);
 	  status = getgrnam_plusgroup (&result->gr_name[1], result, ent,
 				       buffer, buflen, errnop);
@@ -406,7 +406,7 @@
   return result;
 }
 
-/* Searches in /etc/group and the NIS/NIS+ map for a special group */
+/* Searches in /opt/etc/group and the NIS/NIS+ map for a special group */
 static enum nss_status
 internal_getgrnam_r (const char *name, struct group *result, ent_t *ent,
 		     char *buffer, size_t buflen, int *errnop)
@@ -537,7 +537,7 @@
   return result;
 }
 
-/* Searches in /etc/group and the NIS/NIS+ map for a special group id */
+/* Searches in /opt/etc/group and the NIS/NIS+ map for a special group id */
 static enum nss_status
 internal_getgrgid_r (gid_t gid, struct group *result, ent_t *ent,
 		     char *buffer, size_t buflen, int *errnop)
@@ -614,7 +614,7 @@
 	  enum nss_status status;
 
 	  /* Store the group in the blacklist for the "+" at the end of
-	     /etc/group */
+	     /opt/etc/group */
 	  memcpy (buf, &result->gr_name[1], len);
 	  status = getgrnam_plusgroup (&result->gr_name[1], result, ent,
 				       buffer, buflen, errnop);
diff -Naur glibc-2.23/nis/nss_compat/compat-initgroups.c nglibc-2.23/nis/nss_compat/compat-initgroups.c
--- a/nis/nss_compat/compat-initgroups.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nis/nss_compat/compat-initgroups.c	2018-01-24 19:10:59.000000000 +0300
@@ -136,7 +136,7 @@
   else
     ent->blacklist.current = 0;
 
-  ent->stream = fopen ("/etc/group", "rme");
+  ent->stream = fopen ("/opt/etc/group", "rme");
 
   if (ent->stream == NULL)
     status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
@@ -477,7 +477,7 @@
 			    strlen (&grpbuf.gr_name[1]), ent))
 	    continue;
 	  /* Store the group in the blacklist for the "+" at the end of
-	     /etc/group */
+	     /opt/etc/group */
 	  blacklist_store_name (&grpbuf.gr_name[1], ent);
 	  if (nss_getgrnam_r == NULL)
 	    return NSS_STATUS_UNAVAIL;
diff -Naur glibc-2.23/nis/nss_compat/compat-pwd.c nglibc-2.23/nis/nss_compat/compat-pwd.c
--- a/nis/nss_compat/compat-pwd.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nis/nss_compat/compat-pwd.c	2018-01-24 19:08:43.000000000 +0300
@@ -235,7 +235,7 @@
 
   if (ent->stream == NULL)
     {
-      ent->stream = fopen ("/etc/passwd", "rme");
+      ent->stream = fopen ("/opt/etc/passwd", "rme");
 
       if (ent->stream == NULL)
 	status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
@@ -426,7 +426,7 @@
       if (!in_blacklist (result->pw_name, strlen (result->pw_name), ent))
 	{
 	  /* Store the User in the blacklist for possible the "+" at the
-	     end of /etc/passwd */
+	     end of /opt/etc/passwd */
 	  blacklist_store_name (result->pw_name, ent);
 	  copy_pwd_changes (result, &ent->pwd, p2, p2len);
 	  break;
@@ -478,7 +478,7 @@
   return NSS_STATUS_SUCCESS;
 }
 
-/* This function handle the +user entrys in /etc/passwd */
+/* This function handle the +user entrys in /opt/etc/passwd */
 static enum nss_status
 getpwnam_plususer (const char *name, struct passwd *result, ent_t *ent,
 		   char *buffer, size_t buflen, int *errnop)
@@ -626,7 +626,7 @@
 	  enum nss_status status;
 
 	  /* Store the User in the blacklist for the "+" at the end of
-	     /etc/passwd */
+	     /opt/etc/passwd */
 	  memcpy (buf, &result->pw_name[1], len);
 	  status = getpwnam_plususer (&result->pw_name[1], result, ent,
 				      buffer, buflen, errnop);
@@ -711,7 +711,7 @@
   return result;
 }
 
-/* Searches in /etc/passwd and the NIS/NIS+ map for a special user */
+/* Searches in /opt/etc/passwd and the NIS/NIS+ map for a special user */
 static enum nss_status
 internal_getpwnam_r (const char *name, struct passwd *result, ent_t *ent,
 		     char *buffer, size_t buflen, int *errnop)
@@ -876,7 +876,7 @@
   return result;
 }
 
-/* This function handle the + entry in /etc/passwd for getpwuid */
+/* This function handle the + entry in /opt/etc/passwd for getpwuid */
 static enum nss_status
 getpwuid_plususer (uid_t uid, struct passwd *result, char *buffer,
 		   size_t buflen, int *errnop)
@@ -918,7 +918,7 @@
   return NSS_STATUS_RETURN;
 }
 
-/* Searches in /etc/passwd and the NSS subsystem for a special user id */
+/* Searches in /opt/etc/passwd and the NSS subsystem for a special user id */
 static enum nss_status
 internal_getpwuid_r (uid_t uid, struct passwd *result, ent_t *ent,
 		     char *buffer, size_t buflen, int *errnop)
diff -Naur glibc-2.23/nis/nss_compat/compat-spwd.c nglibc-2.23/nis/nss_compat/compat-spwd.c
--- a/nis/nss_compat/compat-spwd.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nis/nss_compat/compat-spwd.c	2018-01-24 19:14:07.000000000 +0300
@@ -191,7 +191,7 @@
 
   if (ent->stream == NULL)
     {
-      ent->stream = fopen ("/etc/shadow", "rme");
+      ent->stream = fopen ("/opt/etc/shadow", "rme");
 
       if (ent->stream == NULL)
 	status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
@@ -386,7 +386,7 @@
       if (!in_blacklist (result->sp_namp, strlen (result->sp_namp), ent))
 	{
 	  /* Store the User in the blacklist for possible the "+" at the
-	     end of /etc/passwd */
+	     end of /opt/etc/passwd */
 	  blacklist_store_name (result->sp_namp, ent);
 	  copy_spwd_changes (result, &ent->pwd, p2, p2len);
 	  break;
@@ -430,7 +430,7 @@
 }
 
 
-/* This function handle the +user entrys in /etc/shadow */
+/* This function handle the +user entrys in /opt/etc/shadow */
 static enum nss_status
 getspnam_plususer (const char *name, struct spwd *result, ent_t *ent,
 		   char *buffer, size_t buflen, int *errnop)
@@ -581,7 +581,7 @@
 	  enum nss_status status;
 
 	  /* Store the User in the blacklist for the "+" at the end of
-	     /etc/passwd */
+	     /opt/etc/passwd */
 	  memcpy (buf, &result->sp_namp[1], len);
 	  status = getspnam_plususer (&result->sp_namp[1], result, ent,
 				      buffer, buflen, errnop);
@@ -669,7 +669,7 @@
 }
 
 
-/* Searches in /etc/passwd and the NIS/NIS+ map for a special user */
+/* Searches in /opt/etc/passwd and the NIS/NIS+ map for a special user */
 static enum nss_status
 internal_getspnam_r (const char *name, struct spwd *result, ent_t *ent,
 		     char *buffer, size_t buflen, int *errnop)
diff -Naur glibc-2.23/nis/nss-default.c nglibc-2.23/nis/nss-default.c
--- a/nis/nss-default.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nis/nss-default.c	2018-01-25 16:53:56.000000000 +0300
@@ -27,7 +27,7 @@
 
 
 /* Path of the file.  */
-static const char default_nss[] = "/etc/default/nss";
+static const char default_nss[] = "/opt/etc/default/nss";
 
 /* Flags once read from the file.  */
 static int default_nss_flags;
diff -Naur glibc-2.23/nscd/hstcache.c nglibc-2.23/nscd/hstcache.c
--- a/nscd/hstcache.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nscd/hstcache.c	2018-01-24 17:53:50.000000000 +0300
@@ -292,7 +292,7 @@
       /* If we are adding a GETHOSTBYNAME{,v6} entry we must be prepared
 	 that the answer we get from the NSS does not contain the key
 	 itself.  This is the case if the resolver is used and the name
-	 is extended by the domainnames from /etc/resolv.conf.  Therefore
+	 is extended by the domainnames from /opt/etc/resolv.conf.  Therefore
 	 we explicitly add the name here.  */
       key_copy = memcpy (cp, key, req->key_len);
 
diff -Naur glibc-2.23/nscd/nscd-client.h nglibc-2.23/nscd/nscd-client.h
--- a/nscd/nscd-client.h	2016-02-18 20:54:00.000000000 +0300
+++ b/nscd/nscd-client.h	2018-01-25 16:47:08.000000000 +0300
@@ -42,7 +42,7 @@
 #define _PATH_NSCDSOCKET "/var/run/nscd/socket"
 
 /* Path for the configuration file.  */
-#define _PATH_NSCDCONF	 "/etc/nscd.conf"
+#define _PATH_NSCDCONF	 "/opt/etc/nscd.conf"
 
 /* Maximum allowed length for the key.  */
 #define MAXKEYLEN 1024
diff -Naur glibc-2.23/nscd/nscd_stat.c nglibc-2.23/nscd/nscd_stat.c
--- a/nscd/nscd_stat.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nscd/nscd_stat.c	2018-01-25 16:57:59.000000000 +0300
@@ -294,7 +294,7 @@
 		"%15" PRIuMAX "  number of delays on rdlock\n"
 		"%15" PRIuMAX "  number of delays on wrlock\n"
 		"%15" PRIuMAX "  memory allocations failed\n"
-		"%15s  check /etc/%s for changes\n"),
+		"%15s  check /opt/etc/%s for changes\n"),
 	      dbnames[i], enabled, persistent, shared,
 	      data.dbs[i].module,
 	      data.dbs[i].datasize, data.dbs[i].dataused,
diff -Naur glibc-2.23/nss/bug-erange.c nglibc-2.23/nss/bug-erange.c
--- a/nss/bug-erange.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/bug-erange.c	2018-01-24 17:53:24.000000000 +0300
@@ -37,7 +37,7 @@
     {
       printf ("gethostbyname_r failed: %s (errno: %m)\n", strerror (res));
 
-      if (access ("/etc/resolv.conf", R_OK))
+      if (access ("/opt/etc/resolv.conf", R_OK))
 	{
 	  puts ("DNS probably not set up");
 	  return 0;
diff -Naur glibc-2.23/nss/db-Makefile nglibc-2.23/nss/db-Makefile
--- a/nss/db-Makefile	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/db-Makefile	2018-01-24 19:13:37.000000000 +0300
@@ -18,8 +18,8 @@
 # License along with the GNU C Library; if not, see
 # <http://www.gnu.org/licenses/>.
 
-DATABASES = $(wildcard /etc/passwd /etc/group /etc/ethers /etc/protocols \
-		       /etc/rpc /etc/services /etc/shadow /etc/gshadow \
+DATABASES = $(wildcard /opt/etc/passwd /opt/etc/group /etc/ethers /etc/protocols \
+		       /etc/rpc /etc/services /opt/etc/shadow /etc/gshadow \
 		       /etc/netgroup)
 
 VAR_DB = /var/db
@@ -30,7 +30,7 @@
 all: $(patsubst %,$(VAR_DB)/%.db,$(notdir $(DATABASES)))
 
 
-$(VAR_DB)/passwd.db: /etc/passwd
+$(VAR_DB)/passwd.db: /opt/etc/passwd
 	@printf %s "$(patsubst %.db,%,$(@F))... "
 	@$(AWK) 'BEGIN { FS=":"; OFS=":" } \
 		 /^[ \t]*$$/ { next } \
@@ -40,7 +40,7 @@
 	$(MAKEDB) -o $@ -
 	@echo "done."
 
-$(VAR_DB)/group.db: /etc/group
+$(VAR_DB)/group.db: /opt/etc/group
 	@printf %s "$(patsubst %.db,%,$(@F))... "
 	@$(AWK) 'BEGIN { FS=":"; OFS=":" } \
 		 /^[ \t]*$$/ { next } \
@@ -109,7 +109,7 @@
 	$(MAKEDB) -o $@ -
 	@echo "done."
 
-$(VAR_DB)/shadow.db: /etc/shadow
+$(VAR_DB)/shadow.db: /opt/etc/shadow
 	@printf %s "$(patsubst %.db,%,$(@F))... "
 	@$(AWK) 'BEGIN { FS=":"; OFS=":" } \
 		 /^[ \t]*$$/ { next } \
diff -Naur glibc-2.23/nss/nss_files/files-alias.c nglibc-2.23/nss/nss_files/files-alias.c
--- a/nss/nss_files/files-alias.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/nss_files/files-alias.c	2018-01-25 17:01:33.000000000 +0300
@@ -47,7 +47,7 @@
 
   if (*stream == NULL)
     {
-      *stream = fopen ("/etc/aliases", "rce");
+      *stream = fopen ("/opt/etc/aliases", "rce");
 
       if (*stream == NULL)
 	status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
diff -Naur glibc-2.23/nss/nss_files/files-init.c nglibc-2.23/nss/nss_files/files-init.c
--- a/nss/nss_files/files-init.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/nss_files/files-init.c	2018-01-25 17:01:02.000000000 +0300
@@ -21,22 +21,22 @@
 #include <string.h>
 #include <nscd/nscd.h>
 
-#define PWD_FILENAME "/etc/passwd"
+#define PWD_FILENAME "/opt/etc/passwd"
 define_traced_file (pwd, PWD_FILENAME);
 
-#define GRP_FILENAME "/etc/group"
+#define GRP_FILENAME "/opt/etc/group"
 define_traced_file (grp, GRP_FILENAME);
 
-#define HST_FILENAME "/etc/hosts"
+#define HST_FILENAME "/opt/etc/hosts"
 define_traced_file (hst, HST_FILENAME);
 
-#define RESOLV_FILENAME "/etc/resolv.conf"
+#define RESOLV_FILENAME "/opt/etc/resolv.conf"
 define_traced_file (resolv, RESOLV_FILENAME);
 
-#define SERV_FILENAME "/etc/services"
+#define SERV_FILENAME "/opt/etc/services"
 define_traced_file (serv, SERV_FILENAME);
 
-#define NETGR_FILENAME "/etc/netgroup"
+#define NETGR_FILENAME "/opt/etc/netgroup"
 define_traced_file (netgr, NETGR_FILENAME);
 
 void
diff -Naur glibc-2.23/nss/nss_files/files-initgroups.c nglibc-2.23/nss/nss_files/files-initgroups.c
--- a/nss/nss_files/files-initgroups.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/nss_files/files-initgroups.c	2018-01-24 19:11:17.000000000 +0300
@@ -31,7 +31,7 @@
 			   long int *size, gid_t **groupsp, long int limit,
 			   int *errnop)
 {
-  FILE *stream = fopen ("/etc/group", "rce");
+  FILE *stream = fopen ("/opt/etc/group", "rce");
   if (stream == NULL)
     {
       *errnop = errno;
diff -Naur glibc-2.23/nss/nss_files/files-key.c nglibc-2.23/nss/nss_files/files-key.c
--- a/nss/nss_files/files-key.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/nss_files/files-key.c	2018-01-25 17:00:34.000000000 +0300
@@ -24,7 +24,7 @@
 #include <rpc/des_crypt.h>
 #include "nsswitch.h"
 
-#define DATAFILE "/etc/publickey"
+#define DATAFILE "/opt/etc/publickey"
 
 
 static enum nss_status
diff -Naur glibc-2.23/nss/nss_files/files-netgrp.c nglibc-2.23/nss/nss_files/files-netgrp.c
--- a/nss/nss_files/files-netgrp.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/nss_files/files-netgrp.c	2018-01-25 17:00:45.000000000 +0300
@@ -27,7 +27,7 @@
 #include "nsswitch.h"
 #include "netgroup.h"
 
-#define DATAFILE	"/etc/netgroup"
+#define DATAFILE	"/opt/etc/netgroup"
 
 libnss_files_hidden_proto (_nss_files_endnetgrent)
 
diff -Naur glibc-2.23/nss/nss_files/files-XXX.c nglibc-2.23/nss/nss_files/files-XXX.c
--- a/nss/nss_files/files-XXX.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/nss_files/files-XXX.c	2018-01-25 17:01:48.000000000 +0300
@@ -38,7 +38,7 @@
 
 #define ENTNAME_r	CONCAT(ENTNAME,_r)
 
-#define DATAFILE	"/etc/" DATABASE
+#define DATAFILE	"/opt/etc/" DATABASE
 
 #ifdef NEED_H_ERRNO
 # include <netdb.h>
diff -Naur glibc-2.23/nss/nsswitch.c nglibc-2.23/nss/nsswitch.c
--- a/nss/nsswitch.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/nsswitch.c	2018-01-25 16:56:44.000000000 +0300
@@ -88,7 +88,7 @@
 static name_database *service_table;
 
 /* List of default service lists that were generated by glibc because
-   /etc/nsswitch.conf did not provide a value.
+   /opt/etc/nsswitch.conf did not provide a value.
    The list is only maintained so we can free such service lists in
    __libc_freeres.  */
 static name_database_entry *defconfig_entries;
diff -Naur glibc-2.23/nss/test-netdb.c nglibc-2.23/nss/test-netdb.c
--- a/nss/test-netdb.c	2016-02-18 20:54:00.000000000 +0300
+++ b/nss/test-netdb.c	2018-01-24 19:15:49.000000000 +0300
@@ -20,7 +20,7 @@
   Testing of some network related lookup functions.
   The system databases looked up are:
   - /etc/services
-  - /etc/hosts
+  - /opt/etc/hosts
   - /etc/networks
   - /etc/protocols
   The tests try to be fairly generic and simple so that they work on
diff -Naur glibc-2.23/posix/unistd.h nglibc-2.23/posix/unistd.h
--- a/posix/unistd.h	2016-02-18 20:54:00.000000000 +0300
+++ b/posix/unistd.h	2018-01-24 19:12:20.000000000 +0300
@@ -928,7 +928,7 @@
 extern int acct (const char *__name) __THROW;
 
 
-/* Successive calls return the shells listed in `/etc/shells'.  */
+/* Successive calls return the shells listed in `/opt/etc/shells'.  */
 extern char *getusershell (void) __THROW;
 extern void endusershell (void) __THROW; /* Discard cached info.  */
 extern void setusershell (void) __THROW; /* Rewind and re-read the file.  */
diff -Naur glibc-2.23/resolv/netdb.h nglibc-2.23/resolv/netdb.h
--- a/resolv/netdb.h	2018-01-30 17:42:50.744333413 +0300
+++ b/resolv/netdb.h	2018-01-30 17:33:21.476341865 +0300
@@ -42,12 +42,12 @@
 #include <bits/netdb.h>
 
 /* Absolute file name for network data base files.  */
-#define	_PATH_HEQUIV		"/etc/hosts.equiv"
-#define	_PATH_HOSTS		"/etc/hosts"
-#define	_PATH_NETWORKS		"/etc/networks"
+#define	_PATH_HEQUIV		"/opt/etc/hosts.equiv"
+#define	_PATH_HOSTS		"/opt/etc/hosts"
+#define	_PATH_NETWORKS		"/opt/etc/networks"
 #define	_PATH_NSSWITCH_CONF	"/opt/etc/nsswitch.conf"
-#define	_PATH_PROTOCOLS		"/etc/protocols"
-#define	_PATH_SERVICES		"/etc/services"
+#define	_PATH_PROTOCOLS		"/opt/etc/protocols"
+#define	_PATH_SERVICES		"/opt/etc/services"
 
 
 __BEGIN_DECLS
diff -Naur glibc-2.23/resolv/res_hconf.c nglibc-2.23/resolv/res_hconf.c
--- a/resolv/res_hconf.c	2016-02-18 20:54:00.000000000 +0300
+++ b/resolv/res_hconf.c	2018-01-25 16:56:21.000000000 +0300
@@ -16,8 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* This file provides a Linux /etc/host.conf compatible front end to
-   the various name resolvers (/etc/hosts, named, NIS server, etc.).
+/* This file provides a Linux /opt/etc/host.conf compatible front end to
+   the various name resolvers (/opt/etc/hosts, named, NIS server, etc.).
    Though mostly compatibly, the following differences exist compared
    to the original implementation:
 
@@ -51,7 +51,7 @@
 # define fgets_unlocked __fgets_unlocked
 #endif
 
-#define _PATH_HOSTCONF	"/etc/host.conf"
+#define _PATH_HOSTCONF	"/opt/etc/host.conf"
 
 /* Environment vars that all user to override default behavior:  */
 #define ENV_HOSTCONF	"RESOLV_HOST_CONF"
diff -Naur glibc-2.23/resolv/resolv.h nglibc-2.23/resolv/resolv.h
--- a/resolv/resolv.h	2016-02-18 20:54:00.000000000 +0300
+++ b/resolv/resolv.h	2018-01-24 17:53:06.000000000 +0300
@@ -170,7 +170,7 @@
  */
 
 #ifndef _PATH_RESCONF
-#define _PATH_RESCONF        "/etc/resolv.conf"
+#define _PATH_RESCONF        "/opt/etc/resolv.conf"
 #endif
 
 struct res_sym {
diff -Naur glibc-2.23/shadow/lckpwdf.c nglibc-2.23/shadow/lckpwdf.c
--- a/shadow/lckpwdf.c	2016-02-18 20:54:00.000000000 +0300
+++ b/shadow/lckpwdf.c	2018-01-25 16:58:56.000000000 +0300
@@ -29,7 +29,7 @@
 
 
 /* Name of the lock file.  */
-#define PWD_LOCKFILE "/etc/.pwd.lock"
+#define PWD_LOCKFILE "/opt/etc/.pwd.lock"
 
 /* How long to wait for getting the lock before returning with an
    error.  */
diff -Naur glibc-2.23/sunrpc/rpc/rpc.h nglibc-2.23/sunrpc/rpc/rpc.h
--- a/sunrpc/rpc/rpc.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sunrpc/rpc/rpc.h	2018-01-25 16:49:59.000000000 +0300
@@ -61,8 +61,8 @@
  * OF UNIX BASED ON NFSSRC.  These systems will already have the structures
  * defined by <rpc/netdb.h> included in <netdb.h>.
  */
-/* routines for parsing /etc/rpc */
-#include <rpc/netdb.h>		/* structures and routines to parse /etc/rpc */
+/* routines for parsing /opt/etc/rpc */
+#include <rpc/netdb.h>		/* structures and routines to parse /opt/etc/rpc */
 
 __BEGIN_DECLS
 
diff -Naur glibc-2.23/sysdeps/generic/paths.h nglibc-2.23/sysdeps/generic/paths.h
--- a/sysdeps/generic/paths.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/generic/paths.h	2018-01-25 16:49:10.000000000 +0300
@@ -44,20 +44,20 @@
 #define	_PATH_DEVDB	"/var/run/dev.db"
 #define	_PATH_DEVNULL	"/dev/null"
 #define	_PATH_DRUM	"/dev/drum"
-#define	_PATH_GSHADOW	"/etc/gshadow"
+#define	_PATH_GSHADOW	"/opt/etc/gshadow"
 #define	_PATH_KMEM	"/dev/kmem"
 #define	_PATH_LASTLOG	"/var/log/lastlog"
 #define	_PATH_MAILDIR	"/var/mail"
 #define	_PATH_MAN	"/usr/share/man"
 #define	_PATH_MEM	"/dev/mem"
-#define	_PATH_MNTTAB	"/etc/fstab"
+#define	_PATH_MNTTAB	"/opt/etc/fstab"
 #define	_PATH_MOUNTED	"/var/run/mtab"
-#define	_PATH_NOLOGIN	"/etc/nologin"
+#define	_PATH_NOLOGIN	"/opt/etc/nologin"
 #define	_PATH_PRESERVE	"/var/lib"
 #define	_PATH_RWHODIR	"/var/spool/rwho"
 #define	_PATH_SENDMAIL	"/usr/sbin/sendmail"
-#define	_PATH_SHADOW	"/etc/shadow"
-#define	_PATH_SHELLS	"/etc/shells"
+#define	_PATH_SHADOW	"/opt/etc/shadow"
+#define	_PATH_SHELLS	"/opt/etc/shells"
 #define	_PATH_TTY	"/dev/tty"
 #define	_PATH_UNIX	"/vmunix"
 #define	_PATH_UTMP	"/var/run/utmp"
diff -Naur glibc-2.23/sysdeps/mach/hurd/getdomain.c nglibc-2.23/sysdeps/mach/hurd/getdomain.c
--- a/sysdeps/mach/hurd/getdomain.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/mach/hurd/getdomain.c	2018-01-25 17:04:29.000000000 +0300
@@ -24,8 +24,8 @@
 int
 getdomainname (char *name, size_t len)
 {
-  /* The NIS domain name is just the contents of the file /etc/nisdomain.  */
-  ssize_t n = _hurd_get_host_config ("/etc/nisdomain", name, len);
+  /* The NIS domain name is just the contents of the file /opt/etc/nisdomain.  */
+  ssize_t n = _hurd_get_host_config ("/opt/etc/nisdomain", name, len);
   return n < 0 ? -1 : 0;
 }
 libc_hidden_def (getdomainname)
diff -Naur glibc-2.23/sysdeps/mach/hurd/gethostid.c nglibc-2.23/sysdeps/mach/hurd/gethostid.c
--- a/sysdeps/mach/hurd/gethostid.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/mach/hurd/gethostid.c	2018-01-25 17:02:59.000000000 +0300
@@ -23,11 +23,11 @@
 long int
 gethostid (void)
 {
-  /* The hostid is just the contents of the file /etc/hostid,
+  /* The hostid is just the contents of the file /opt/etc/hostid,
      kept as text of hexadecimal digits.  */
   /* XXX this is supposed to come from the hardware serial number */
   char buf[8];
-  ssize_t n = _hurd_get_host_config ("/etc/hostid", buf, sizeof buf);
+  ssize_t n = _hurd_get_host_config ("/opt/etc/hostid", buf, sizeof buf);
   if (n < 0)
     return -1;
   return strtol (buf, NULL, 16);
diff -Naur glibc-2.23/sysdeps/mach/hurd/gethostname.c nglibc-2.23/sysdeps/mach/hurd/gethostname.c
--- a/sysdeps/mach/hurd/gethostname.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/mach/hurd/gethostname.c	2018-01-25 17:02:35.000000000 +0300
@@ -24,8 +24,8 @@
 int
 __gethostname (char *name, size_t len)
 {
-  /* The host name is just the contents of the file /etc/hostname.  */
-  ssize_t n = _hurd_get_host_config ("/etc/hostname", name, len);
+  /* The host name is just the contents of the file /opt/etc/hostname.  */
+  ssize_t n = _hurd_get_host_config ("/opt/etc/hostname", name, len);
   return n < 0 ? -1 : 0;
 }
 
diff -Naur glibc-2.23/sysdeps/mach/hurd/setdomain.c nglibc-2.23/sysdeps/mach/hurd/setdomain.c
--- a/sysdeps/mach/hurd/setdomain.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/mach/hurd/setdomain.c	2018-01-25 17:03:16.000000000 +0300
@@ -23,7 +23,7 @@
 int
 setdomainname (const char *name, size_t len)
 {
-  /* The NIS domain name is just the contents of the file /etc/nisdomain.  */
-  ssize_t n = _hurd_set_host_config ("/etc/nisdomain", name, len);
+  /* The NIS domain name is just the contents of the file /opt/etc/nisdomain.  */
+  ssize_t n = _hurd_set_host_config ("/opt/etc/nisdomain", name, len);
   return n < 0 ? -1 : 0;
 }
diff -Naur glibc-2.23/sysdeps/mach/hurd/sethostid.c nglibc-2.23/sysdeps/mach/hurd/sethostid.c
--- a/sysdeps/mach/hurd/sethostid.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/mach/hurd/sethostid.c	2018-01-25 17:02:12.000000000 +0300
@@ -30,13 +30,13 @@
   char buf[8], *bp;
   ssize_t n;
 
-  /* The hostid is kept in the file /etc/hostid,
+  /* The hostid is kept in the file /opt/etc/hostid,
      eight characters of upper-case hexadecimal.  */
 
   bp = _itoa_word (id, &buf[sizeof buf], 16, 1);
   while (bp > buf)
     *--bp = '0';
 
-  n = _hurd_set_host_config ("/etc/hostid", buf, sizeof buf);
+  n = _hurd_set_host_config ("/opt/etc/hostid", buf, sizeof buf);
   return n < 0 ? -1 : 0;
 }
diff -Naur glibc-2.23/sysdeps/mach/hurd/sethostname.c nglibc-2.23/sysdeps/mach/hurd/sethostname.c
--- a/sysdeps/mach/hurd/sethostname.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/mach/hurd/sethostname.c	2018-01-25 17:04:46.000000000 +0300
@@ -24,7 +24,7 @@
 int
 sethostname (const char *name, size_t len)
 {
-  /* The host name is just the contents of the file /etc/hostname.  */
-  ssize_t n = _hurd_set_host_config ("/etc/hostname", name, len);
+  /* The host name is just the contents of the file /opt/etc/hostname.  */
+  ssize_t n = _hurd_set_host_config ("/opt/etc/hostname", name, len);
   return n < 0 ? -1 : 0;
 }
diff -Naur glibc-2.23/sysdeps/mach/sys/reboot.h nglibc-2.23/sysdeps/mach/sys/reboot.h
--- a/sysdeps/mach/sys/reboot.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/mach/sys/reboot.h	2018-01-25 16:50:21.000000000 +0300
@@ -106,9 +106,9 @@
 #define	RB_HALT		0x08	/* -h: enter KDB at bootup */
 				/*     for host_reboot(): don't reboot,
 				       just halt */
-#define	RB_INITNAME	0x10	/* -i: name given for /etc/init (unused) */
+#define	RB_INITNAME	0x10	/* -i: name given for /opt/etc/init (unused) */
 #define	RB_DFLTROOT	0x20	/*     use compiled-in rootdev */
-#define	RB_NOBOOTRC	0x20	/* -b: don't run /etc/rc.boot */
+#define	RB_NOBOOTRC	0x20	/* -b: don't run /opt/etc/rc.boot */
 #define RB_ALTBOOT	0x40	/*     use /boot.old vs /boot */
 #define	RB_UNIPROC	0x80	/* -u: start only one processor */
 
diff -Naur glibc-2.23/sysdeps/posix/getaddrinfo.c nglibc-2.23/sysdeps/posix/getaddrinfo.c
--- a/sysdeps/posix/getaddrinfo.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/posix/getaddrinfo.c	2018-01-25 16:59:13.000000000 +0300
@@ -1803,7 +1803,7 @@
 
 
 /* Name of the config file for RFC 3484 sorting (for now).  */
-#define GAICONF_FNAME "/etc/gai.conf"
+#define GAICONF_FNAME "/opt/etc/gai.conf"
 
 
 /* Non-zero if we are supposed to reload the config file automatically
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/aarch64/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/aarch64/dl-cache.h
--- a/sysdeps/unix/sysv/linux/aarch64/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/aarch64/dl-cache.h	2018-01-25 16:51:50.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2003-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/alpha/ioperm.c nglibc-2.23/sysdeps/unix/sysv/linux/alpha/ioperm.c
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c	2018-01-25 17:05:50.000000000 +0300
@@ -51,7 +51,7 @@
 #include <sysdep.h>
 #include <sys/syscall.h>
 
-#define PATH_ALPHA_SYSTYPE	"/etc/alpha_systype"
+#define PATH_ALPHA_SYSTYPE	"/opt/etc/alpha_systype"
 #define PATH_CPUINFO		"/proc/cpuinfo"
 
 #define MAX_PORT	0x10000
@@ -487,7 +487,7 @@
   data->sysvari[0] = 0;
   data->cpumodel[0] = 0;
 
-  /* If there's an /etc/alpha_systype link, we're intending to override
+  /* If there's an /opt/etc/alpha_systype link, we're intending to override
      whatever's in /proc/cpuinfo.  */
   n = __readlink (PATH_ALPHA_SYSTYPE, data->systype, 256 - 1);
   if (n > 0)
@@ -585,7 +585,7 @@
     }
 #endif
 
-  /* Second, collect the contents of /etc/alpha_systype or /proc/cpuinfo.  */
+  /* Second, collect the contents of /opt/etc/alpha_systype or /proc/cpuinfo.  */
 
   if (process_cpuinfo(&data) == 0)
     {
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/arm/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/arm/dl-cache.h
--- a/sysdeps/unix/sysv/linux/arm/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/arm/dl-cache.h	2018-01-25 16:52:12.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2003-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/gethostid.c nglibc-2.23/sysdeps/unix/sysv/linux/gethostid.c
--- a/sysdeps/unix/sysv/linux/gethostid.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/gethostid.c	2018-01-25 17:05:27.000000000 +0300
@@ -22,7 +22,7 @@
 #include <netdb.h>
 #include <not-cancel.h>
 
-#define HOSTIDFILE "/etc/hostid"
+#define HOSTIDFILE "/opt/etc/hostid"
 
 #ifdef SET_PROCEDURE
 int
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/ia64/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/ia64/dl-cache.h
--- a/sysdeps/unix/sysv/linux/ia64/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/ia64/dl-cache.h	2018-01-25 16:51:32.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2000-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/internal_statvfs.c nglibc-2.23/sysdeps/unix/sysv/linux/internal_statvfs.c
--- a/sysdeps/unix/sysv/linux/internal_statvfs.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/internal_statvfs.c	2018-01-25 17:05:05.000000000 +0300
@@ -270,7 +270,7 @@
 #ifndef __ASSUME_STATFS_F_FLAGS
   if ((fsbuf->f_flags & ST_VALID) == 0)
     /* Determining the flags is tricky.  We have to read /proc/mounts or
-       the /etc/mtab file and search for the entry which matches the given
+       the /opt/etc/mtab file and search for the entry which matches the given
        file.  The way we can test for matching filesystem is using the
        device number.  */
     buf->f_flag = __statvfs_getflags (name, fsbuf->f_type, fd);
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/mips/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/mips/dl-cache.h
--- a/sysdeps/unix/sysv/linux/mips/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/mips/dl-cache.h	2018-01-25 16:51:58.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2003-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/paths.h nglibc-2.23/sysdeps/unix/sysv/linux/paths.h
--- a/sysdeps/unix/sysv/linux/paths.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/paths.h	2018-01-25 16:51:14.000000000 +0300
@@ -44,21 +44,21 @@
 #define	_PATH_DEVDB	"/var/run/dev.db"
 #define	_PATH_DEVNULL	"/dev/null"
 #define	_PATH_DRUM	"/dev/drum"
-#define	_PATH_GSHADOW	"/etc/gshadow"
+#define	_PATH_GSHADOW	"/opt/etc/gshadow"
 #define	_PATH_KLOG	"/proc/kmsg"
 #define	_PATH_KMEM	"/dev/kmem"
 #define	_PATH_LASTLOG	"/var/log/lastlog"
 #define	_PATH_MAILDIR	"/var/mail"
 #define	_PATH_MAN	"/usr/share/man"
 #define	_PATH_MEM	"/dev/mem"
-#define	_PATH_MNTTAB	"/etc/fstab"
-#define	_PATH_MOUNTED	"/etc/mtab"
-#define	_PATH_NOLOGIN	"/etc/nologin"
+#define	_PATH_MNTTAB	"/opt/etc/fstab"
+#define	_PATH_MOUNTED	"/opt/etc/mtab"
+#define	_PATH_NOLOGIN	"/opt/etc/nologin"
 #define	_PATH_PRESERVE	"/var/lib"
 #define	_PATH_RWHODIR	"/var/spool/rwho"
 #define	_PATH_SENDMAIL	"/usr/sbin/sendmail"
-#define	_PATH_SHADOW	"/etc/shadow"
-#define	_PATH_SHELLS	"/etc/shells"
+#define	_PATH_SHADOW	"/opt/etc/shadow"
+#define	_PATH_SHELLS	"/opt/etc/shells"
 #define	_PATH_TTY	"/dev/tty"
 #define	_PATH_UNIX	"/boot/vmlinux"
 #define	_PATH_UTMP	"/var/run/utmp"
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h	2018-01-25 16:52:48.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h
--- a/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h	2018-01-25 16:52:58.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2001-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/shm-directory.c nglibc-2.23/sysdeps/unix/sysv/linux/shm-directory.c
--- a/sysdeps/unix/sysv/linux/shm-directory.c	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/shm-directory.c	2018-01-25 17:05:15.000000000 +0300
@@ -65,7 +65,7 @@
     }
 
   /* OK, do it the hard way.  Look through the /proc/mounts file and if
-     this does not exist through /etc/fstab to find the mount point.  */
+     this does not exist through /opt/etc/fstab to find the mount point.  */
   fp = __setmntent ("/proc/mounts", "r");
   if (__glibc_unlikely (fp == NULL))
     {
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/sparc/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/sparc/dl-cache.h
--- a/sysdeps/unix/sysv/linux/sparc/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/sparc/dl-cache.h	2018-01-25 16:51:41.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2003-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/sparc/sparc64/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/sparc/sparc64/dl-cache.h
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/dl-cache.h	2018-01-25 16:53:06.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 1999-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/x86_64/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/x86_64/dl-cache.h
--- a/sysdeps/unix/sysv/linux/x86_64/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/x86_64/dl-cache.h	2018-01-25 16:52:21.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 1999-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff -Naur glibc-2.23/sysdeps/unix/sysv/linux/x86_64/x32/dl-cache.h nglibc-2.23/sysdeps/unix/sysv/linux/x86_64/x32/dl-cache.h
--- a/sysdeps/unix/sysv/linux/x86_64/x32/dl-cache.h	2016-02-18 20:54:00.000000000 +0300
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/dl-cache.h	2018-01-25 16:53:14.000000000 +0300
@@ -1,4 +1,4 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+/* Support for reading /opt/etc/ld.so.cache files written by Linux ldconfig.
    Copyright (C) 2012-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
