r2202 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Nov 23 12:21:18 PST 2005


Author: manuel
Date: 2005-11-23 13:21:17 -0700 (Wed, 23 Nov 2005)
New Revision: 2202

Modified:
   jhalfs/trunk/jhalfs
Log:
Fixed remainig issues with pre-existing lfs user.
Fixed clean-all target to not delete the book sources directory.

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-11-18 21:35:22 UTC (rev 2201)
+++ jhalfs/trunk/jhalfs	2005-11-23 20:21:17 UTC (rev 2202)
@@ -345,6 +345,8 @@
 	@if [ ! -d /home/lfs ]; then \\
 		groupadd lfs; \\
 		useradd -s /bin/bash -g lfs -m -k /dev/null lfs; \\
+	else \\
+		touch user-lfs-exist; \\
 	fi;
 	@chown lfs \$(LFS)/tools && \\
 	chown lfs \$(LFS)/sources && \\
@@ -838,21 +840,23 @@
 chapter789:  chapter6 $chapter789
 
 clean-all:  clean
-	rm -rf ./*
+	rm -rf ./{commands,logs,Makefile,dump-lfs-scripts.xsl,functions,packages,patches}
 
 clean:  clean-chapter789 clean-chapter6 clean-chapter5 clean-chapter4
 
 clean-chapter4:
-	-userdel lfs
-	rm -rf /home/lfs
+	-if [ ! -f user-lfs-exist ]; then \\
+		userdel lfs; \\
+		rm -rf /home/lfs; \\
+	fi;
 	rm -rf \$(LFS)/tools
 	rm -f /tools
-	rm -f envars
+	rm -f envars user-lfs-exist
 	rm -f 02* logs/02*.log
 
 clean-chapter5:
 	rm -rf \$(LFS)/tools/*
-	rm -f $chapter5 restore-lfs-env
+	rm -f $chapter5 restore-lfs-env sources-dir
 	cd logs && rm -f $chapter5 && cd ..
   
 clean-chapter6:




More information about the alfs-log mailing list