From 94182ef5e8ed66fd6e7cecc1feaaec54ef72c1fa Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 15 Jul 2014 16:31:34 +0200 Subject: [paths.inc] global paths determination --- remote/includes/paths.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 remote/includes/paths.inc (limited to 'remote/includes/paths.inc') 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'." -- cgit v1.2.3-55-g7522 From ae0f4f08a2f17debde9fcda10823474d6ebff8ac Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 17 Jul 2014 15:24:29 +0200 Subject: [paths.inc] added a few comments --- remote/includes/paths.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'remote/includes/paths.inc') diff --git a/remote/includes/paths.inc b/remote/includes/paths.inc index ca9c305b..5fd1bf6b 100644 --- a/remote/includes/paths.inc +++ b/remote/includes/paths.inc @@ -1,7 +1,11 @@ # -# TODO +# This include tries to determine system paths needed by mltk-modules +# The idea here is to have a central place to determine paths required +# by different modules instead of each module determining them on its own. # + +# Location of PAM-modules 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 -- cgit v1.2.3-55-g7522 From 5d2a13927b431d7ce87c10347fc63c9f7ef46b77 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 17 Jul 2014 15:33:47 +0200 Subject: oops2 - debug code .... --- remote/includes/paths.inc | 1 - 1 file changed, 1 deletion(-) (limited to 'remote/includes/paths.inc') diff --git a/remote/includes/paths.inc b/remote/includes/paths.inc index 5fd1bf6b..8ab016df 100644 --- a/remote/includes/paths.inc +++ b/remote/includes/paths.inc @@ -11,4 +11,3 @@ for CANDIDATE in $(strings "$(ldd "$(which login)" | grep libpam.so | head -n 1 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'." -- cgit v1.2.3-55-g7522