[Lunar-commits] CVS: theedge/bin lvu,1.43,1.44

Auke Kok sofar at lunar-linux.org
Sun Mar 14 21:43:33 GMT 2004


Update of /var/cvs/lunar/theedge/bin
In directory dbguin.lunar-linux.org:/tmp/cvs-serv20967/bin

Modified Files:
	lvu 
Log Message:
Major lrm/exluded/protected rewrite:
- allow re's in excluded/protected
- true protected directories with recursion
- excluded ONLY contains stuff that we DO NOT WANT TO SEE in the install logs
- lvu alien adjusted too
- track() function adjusted and simplified
- removed unneeded lrm tmpfiles and loops, simplified


Index: lvu
===================================================================
RCS file: /var/cvs/lunar/theedge/bin/lvu,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- lvu	23 Feb 2004 21:15:02 -0000	1.43
+++ lvu	14 Mar 2004 21:43:31 -0000	1.44
@@ -177,30 +177,23 @@
 
 
 alien() {
+  message "In a few minutes I will print files found on this disk that were not"
+  message "installed by lunar. This is not a security feature! Files could still"
+  message "be lurking undetected on this box."
 
-  message  "In a few minutes I will print files found on this disk"
-  message  "that were not installed by lunar.  This is not a"
-  message  "security feature!  Files could still be lurking"
-  message  "undetected on this box."
-
-  rm    -f  /tmp/lvu.found
-  rm    -f  /tmp/lvu.known
+  TMP_FOUND=$(temp_create "lvu.found")
+  TMP_KNOWN=$(temp_create "lvu.known")
 
   message  "Discovering ambient files..."
-  find  $TRACKED  |  files  |  filter  "$EXCLUDED"  |  sort  >/tmp/lvu.found
- 
+  find $TRACKED | files | grep -v -f "$EXCLUDED" | grep -v -f "$PROTECTED" | sort | uniq > $TMP_FOUND
   message  "Discovering installed files..."
-  cat  $INSTALL_LOGS/*  |  files  |  sort  >  /tmp/lvu.known
-
-  diff  -B  -a  -d  /tmp/lvu.found  /tmp/lvu.known  |
-  grep  -v  "^> "                                     |
-  grep      "^< "                                     |
-  cut  -c  3-                                         |
-  filter  "$PROTECTED"
+  cat $INSTALL_LOGS/* | files | sort | uniq > $TMP_KNOWN
 
-  rm  -f  /tmp/lvu.found
-  rm  -f  /tmp/lvu.known
+  diff -B -a -d $TMP_FOUND $TMP_KNOWN | grep -e "^< " | cut -c 3-
 
+read
+  temp_destroy $TMP_FOUND
+  temp_destroy $TMP_KNOWN
 }
 
 



More information about the Lunar-commits mailing list