[Lunar-commits] r14736 - in moonbase/trunk/security/Linux-PAM: . plugin.d

Auke Kok sofar at lunar-linux.org
Sun May 15 18:21:54 UTC 2005


Author: sofar
Date: 2005-05-15 18:21:53 +0000 (Sun, 15 May 2005)
New Revision: 14736

Added:
   moonbase/trunk/security/Linux-PAM/plugin.d/
   moonbase/trunk/security/Linux-PAM/plugin.d/Linux-PAM.plugin
Log:
merging in this post-build plugin.


Added: moonbase/trunk/security/Linux-PAM/plugin.d/Linux-PAM.plugin
===================================================================
--- moonbase/trunk/security/Linux-PAM/plugin.d/Linux-PAM.plugin	2005-05-15 18:20:54 UTC (rev 14735)
+++ moonbase/trunk/security/Linux-PAM/plugin.d/Linux-PAM.plugin	2005-05-15 18:21:53 UTC (rev 14736)
@@ -0,0 +1,52 @@
+#!/bin/bash
+#############################################################
+#                                                           #
+# Linux-PAM.plugin - handling of pam.d files                #
+#                                                           #
+#############################################################
+#                                                           #
+# Copyright 2005 by Auke Kok under GPLv2                    #
+#                                                           #
+#############################################################
+
+
+find_pam_aware()  {
+  local MODULE SECTION
+  debug_msg "find_pam_aware ($@)"
+
+  for MODULE in $(list_installed); do 
+    SECTION=$(find_section $MODULE)
+    if [ -d "$MOONBASE/$SECTION/$MODULE/pam.d" ] && 
+           [ "$MODULE" != "Linux-PAM" ]; then
+      echo $MODULE
+    fi
+  done < $MODULE_STATUS
+}
+
+
+plugin_pam_post_build()
+{
+  local FILE
+  debug_msg "plugin_pam_post_build ($@)"
+  if [ -d "$SCRIPT_DIRECTORY/pam.d" ] ; then
+    verbose_msg "handling pam config files"
+
+    invoke_installwatch
+
+    cd "$SCRIPT_DIRECTORY/pam.d"
+    if [ ! -d /etc/pam.d ] ; then
+          mkdir -p /etc/pam.d
+        fi
+
+    for FILE in $(ls -1) ; do
+      if [ ! -f /etc/pam.d/$FILE ] ; then
+        /usr/bin/install -g 0 -o 0 -m 0600 $FILE /etc/pam.d
+      fi
+    done
+    devoke_installwatch
+  fi
+  return 2
+}
+
+
+plugin_register BUILD_POST_BUILD plugin_pam_post_build



More information about the Lunar-commits mailing list