diff options
| author | root | 2014-07-24 23:26:00 +0200 |
|---|---|---|
| committer | root | 2014-07-24 23:26:00 +0200 |
| commit | ec9fb42e19ed245baf9915f7da9209253ffbec98 (patch) | |
| tree | ffb011af7e836669a6f98a5c11a0c06233901f3a /remote/includes | |
| parent | [kernel] Remove set -x call (diff) | |
| download | tm-scripts-ec9fb42e19ed245baf9915f7da9209253ffbec98.tar.gz tm-scripts-ec9fb42e19ed245baf9915f7da9209253ffbec98.tar.xz tm-scripts-ec9fb42e19ed245baf9915f7da9209253ffbec98.zip | |
Keep split usr if original system has it, add extra logic if no split usr
Diffstat (limited to 'remote/includes')
| -rw-r--r-- | remote/includes/paths.inc | 16 |
1 files changed, 16 insertions, 0 deletions
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 |
