CVS: theedge/var/lib/lunar/functions install.lunar,1.22,1.23
elaine at lunar-linux.org
elaine at lunar-linux.org
Tue Nov 11 18:39:20 GMT 2003
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv29162
Modified Files:
install.lunar
Log Message:
Always keep a copy of the scripts used to create a module. This is
intended to be useful for general backtracking, debugging and to
provide an adjunct to the activity file to know what's been done
without resorting to cvs history.
Also safeguards local development work for devs who overwrite their work
with 'lin moonbase' and the like (and yes this is the *real* reason for
adding this little hack).
Adding this to post_install because at this point we know that
we have a successful install (logs and everything have in theory
been created by the time we get here.
Index: install.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/install.lunar,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- install.lunar 6 Nov 2003 22:29:39 -0000 1.22
+++ install.lunar 11 Nov 2003 18:39:18 -0000 1.23
@@ -208,6 +208,17 @@
run_post_install() {
debug_msg "run_post_install ($@)"
+ # keep a record of the module scripts used for every install
+ (
+ if [ ! -e /var/state/lunar/module_history ]; then
+ mkdir /var/state/lunar/module_history
+ fi
+ mod_v_safe_edit $MODULE &&
+ SCRIPT_DATE=$(date -u +%Y%m%d.%H%M) &&
+ MH_NAME=$MOD_V_SNAME-$VERSION-$SCRIPT_DATE.tar.bz2 &&
+ cd $MOONBASE/$SECTION &&
+ tar -cjf /var/state/lunar/module_history/$MH_NAME $MODULE
+ )
if [ -s $SCRIPT_DIRECTORY/POST_INSTALL ] ; then
run_module_file $MODULE POST_INSTALL
fi
More information about the Lunar-commits
mailing list