summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2014-07-15 16:31:34 +0200
committerJonathan Bauer2014-07-15 16:31:34 +0200
commit94182ef5e8ed66fd6e7cecc1feaaec54ef72c1fa (patch)
tree3dcc4ca422c23afe58ca55323751d8206a1a3fb9
parent[kernel.inc] put that 'fwlist' file in its module build dir (diff)
downloadtm-scripts-94182ef5e8ed66fd6e7cecc1feaaec54ef72c1fa.tar.gz
tm-scripts-94182ef5e8ed66fd6e7cecc1feaaec54ef72c1fa.tar.xz
tm-scripts-94182ef5e8ed66fd6e7cecc1feaaec54ef72c1fa.zip
[paths.inc] global paths determination
-rw-r--r--remote/includes/paths.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/remote/includes/paths.inc b/remote/includes/paths.inc
new file mode 100644
index 00000000..ca9c305b
--- /dev/null
+++ b/remote/includes/paths.inc
@@ -0,0 +1,10 @@
+#
+# TODO
+#
+
+for CANDIDATE in $(strings "$(ldd "$(which login)" | grep libpam.so | head -n 1 | awk '{print $3}')" | grep /lib); do
+ [ -f "$CANDIDATE/pam_unix.so" ] && declare -rg SYS_PAM_MODULES_PATH="$CANDIDATE" && break
+done
+
+[ -z "$SYS_PAM_MODULES_PATH" ] && perror "Failed to find pam_unix.so on this system."
+pinfo "PAM Modules are located in '$SYS_PAM_MODULES_PATH'."