From ec9fb42e19ed245baf9915f7da9209253ffbec98 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Jul 2014 23:26:00 +0200 Subject: Keep split usr if original system has it, add extra logic if no split usr --- remote/includes/paths.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'remote/includes/paths.inc') diff --git a/remote/includes/paths.inc b/remote/includes/paths.inc index 2f7c3303..ca692adb 100644 --- a/remote/includes/paths.inc +++ b/remote/includes/paths.inc @@ -12,5 +12,21 @@ done [ -z "$SYS_PAM_MODULES_PATH" ] && perror "Failed to find pam_unix.so on this system." +# +# Figure out if we have split usr +if [ -L "/bin" -a -L "/lib" ]; then + declare -rg USR_SPLIT="no" +else + declare -rg USR_SPLIT="yes" +fi +pdebug "/bin and /lib are split from /usr/bin and /usr/lib (they are not symlinks): $USR_SPLIT" + +SYS_LIB_PATHS="" +for DIR in /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64; do + [ -d "$DIR" -a ! -L "$DIR" ] && SYS_LIB_PATHS+=" $DIR" +done +declare -rg SYS_LIB_PATHS=$SYS_LIB_PATHS +pdebug "System lib paths: $SYS_LIB_PATHS" + true -- cgit v1.2.3-55-g7522