summaryrefslogtreecommitdiffstats
path: root/remote/includes
diff options
context:
space:
mode:
authorManuel Schneider2014-07-23 15:56:46 +0200
committerManuel Schneider2014-07-23 15:56:46 +0200
commitb2ca6da5c5fad2aa6bb08557e5599f67e82633d4 (patch)
tree06d6c9839a7dfcb6378e2a276de9dae1e5a89de0 /remote/includes
parent[pvs2] Config for pvs2 room templates containing room -100 (diff)
parent[drm] one more nvidia: 10de-0dd8: nvidia Quadro 2000 (diff)
downloadtm-scripts-b2ca6da5c5fad2aa6bb08557e5599f67e82633d4.tar.gz
tm-scripts-b2ca6da5c5fad2aa6bb08557e5599f67e82633d4.tar.xz
tm-scripts-b2ca6da5c5fad2aa6bb08557e5599f67e82633d4.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/includes')
-rw-r--r--remote/includes/distribution.inc2
-rw-r--r--remote/includes/paths.inc13
-rw-r--r--remote/includes/system.inc6
3 files changed, 16 insertions, 5 deletions
diff --git a/remote/includes/distribution.inc b/remote/includes/distribution.inc
index 137da7ef..485d1224 100644
--- a/remote/includes/distribution.inc
+++ b/remote/includes/distribution.inc
@@ -18,7 +18,7 @@ detect_distribution () {
PACKET_MANAGER="zypper"
PACKET_HANDLER="rpm"
;;
- scientific|fedora)
+ centos|scientific|fedora)
PACKET_MANAGER="yum"
PACKET_HANDLER="rpm"
;;
diff --git a/remote/includes/paths.inc b/remote/includes/paths.inc
new file mode 100644
index 00000000..8ab016df
--- /dev/null
+++ b/remote/includes/paths.inc
@@ -0,0 +1,13 @@
+#
+# 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
+
+[ -z "$SYS_PAM_MODULES_PATH" ] && perror "Failed to find pam_unix.so on this system."
diff --git a/remote/includes/system.inc b/remote/includes/system.inc
index 17a80761..23a5f18b 100644
--- a/remote/includes/system.inc
+++ b/remote/includes/system.inc
@@ -19,9 +19,8 @@ export MAKEFLAGS="-j$CPU_CORES"
if [ "$(uname -m)x" = "x86_64x" ]; then
# Setting LIB64, as openSuse differentiates but Ubuntu does not:
case $SYS_DISTRIBUTION in
- ubuntu | debian) LIB64="lib" ;;
- opensuse) LIB64="lib64" ;;
- fedora) LIB64="lib64" ;;
+ ubuntu | debian) LIB64="lib" ;;
+ opensuse | fedora | centos) LIB64="lib64" ;;
*) perror "Cannot set LIB64, SYS_DISTRIBUTION: $SYS_DISTRIBUTION unknown!" ;;
esac
AMD64_I386=amd64
@@ -35,4 +34,3 @@ else
AMD64_X86=x86
ARCHREGEX="(i[3456]86|x86[_-]32)"
fi
-