[Lunar-commits] r15023 - moonbase/trunk/security/Linux-PAM

Auke Kok sofar at lunar-linux.org
Wed May 25 13:10:33 UTC 2005


Author: sofar
Date: 2005-05-25 13:10:32 +0000 (Wed, 25 May 2005)
New Revision: 15023

Modified:
   moonbase/trunk/security/Linux-PAM/CONFIGURE
   moonbase/trunk/security/Linux-PAM/POST_INSTALL
   moonbase/trunk/security/Linux-PAM/POST_REMOVE
Log:
Reworked this, should be okay now.


Modified: moonbase/trunk/security/Linux-PAM/CONFIGURE
===================================================================
--- moonbase/trunk/security/Linux-PAM/CONFIGURE	2005-05-25 12:33:09 UTC (rev 15022)
+++ moonbase/trunk/security/Linux-PAM/CONFIGURE	2005-05-25 13:10:32 UTC (rev 15023)
@@ -1,17 +1,8 @@
-if  !  grep  -q  RElin_PAM_AWARE  $MODULE_CONFIG;  then
-
-message  "${MESSAGE_COLOR}If Linux-PAM is being installed for"  \
-         "the first time then all installed or held pam aware"  \
-         "MODULEs should be re-lin for them to use Linux-PAM"   \
-         "to authenticate.${DEFAULT_COLOR}"
-
-if    query  "Re-lin all Linux-PAM aware MODULEs?" n
-then  RElin_PAM_AWARE="y"
-else  RElin_PAM_AWARE="n"
+unset_module_config RElin_PAM_AWARE
+if ! module_installed $MODULE; then
+  message  "${MESSAGE_COLOR}If Linux-PAM is being installed for"  \
+           "the first time then all installed or held pam aware"  \
+           "MODULEs should be re-lin for them to use Linux-PAM"   \
+           "to authenticate.${DEFAULT_COLOR}"
+  mquery RElin_PAM_AWARE "Re-lin all Linux-PAM aware MODULEs?" y
 fi
-
-TEMP=`grep  -v  "RElin_PAM_AWARE="             $MODULE_CONFIG`
-echo  "$TEMP"                               >   $MODULE_CONFIG
-echo  "RElin_PAM_AWARE=$RElin_PAM_AWARE"  >>  $MODULE_CONFIG
-
-fi

Modified: moonbase/trunk/security/Linux-PAM/POST_INSTALL
===================================================================
--- moonbase/trunk/security/Linux-PAM/POST_INSTALL	2005-05-25 12:33:09 UTC (rev 15022)
+++ moonbase/trunk/security/Linux-PAM/POST_INSTALL	2005-05-25 13:10:32 UTC (rev 15023)
@@ -1,6 +1,5 @@
-case  $RElin_PAM_AWARE  in
-  y|Y)  find_pam_aware | while read mod; do
+if [ "$RElin_PAM_AWARE" == "y" ]; then
+  find_pam_aware | while read mod; do
 	lin -c $mod
-	done
-            ;;
-esac
+  done
+fi

Modified: moonbase/trunk/security/Linux-PAM/POST_REMOVE
===================================================================
--- moonbase/trunk/security/Linux-PAM/POST_REMOVE	2005-05-25 12:33:09 UTC (rev 15022)
+++ moonbase/trunk/security/Linux-PAM/POST_REMOVE	2005-05-25 13:10:32 UTC (rev 15023)
@@ -1,9 +1,8 @@
-if ! grep -q '(lin)' /proc/$PPID/stat ; then
-message  "${MESSAGE_COLOR}If Linux-PAM is being permanently removed"  \
-         "then all pam aware modules must be re-linned for"              \
-         "authentication to continue working.${DEFAULT_COLOR}"
-  if    query  "Re-lin all Linux-PAM aware modules?" n
-  then  
+if [ "$UPGRADE" != "on" ] ; then
+  message  "${MESSAGE_COLOR}If Linux-PAM is being permanently removed"  \
+           "then all pam aware modules must be re-linned for"  \
+           "authentication to continue working.${DEFAULT_COLOR}"
+  if query "Re-lin all Linux-PAM aware modules?" n ; then
 	find_pam_aware | while read mod; do
 		lin -c $mod
 	done



More information about the Lunar-commits mailing list