[Lunar-commits] CVS: theedge/var/lib/lunar/functions config.lunar,
1.8, 1.9 modules.lunar, 1.35, 1.36
Auke Kok
sofar at lunar-linux.org
Sun Mar 21 22:17:26 GMT 2004
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv28064/var/lib/lunar/functions
Modified Files:
config.lunar modules.lunar
Log Message:
Adding all round checking for the [sg]et_config_ functions.
Index: config.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/config.lunar,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- config.lunar 18 Mar 2004 12:16:55 -0000 1.8
+++ config.lunar 21 Mar 2004 22:17:24 -0000 1.9
@@ -28,6 +28,12 @@
else
NEW="$2=$3"
fi
+
+ # on-demand creation
+ if [ -f $1 ] ; then
+ touch $1
+ fi
+
lock_file $1 &&
if [ -n "$LINE" ] ; then
sedit "s:$LINE:$NEW:" $1
@@ -39,7 +45,9 @@
get_config() {
- cat $1 | grep -w "$2=.*" | cut -d= -f2-
+ if [ -f $1 ] ; then
+ cat $1 | grep -w "$2=.*" | cut -d= -f2-
+ fi
}
Index: modules.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/modules.lunar,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- modules.lunar 15 Mar 2004 22:54:34 -0000 1.35
+++ modules.lunar 21 Mar 2004 22:17:24 -0000 1.36
@@ -208,7 +208,7 @@
SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
run_module_file $1 DETAILS &> /dev/null &&
SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-$BUILD_DIRECTORY/$1-$VERSION}
- mod_v_safe_edit $1
+ mod_v_safe_edit $1
MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MOD_V_SNAME}
return 0
More information about the Lunar-commits
mailing list