[LON-CAPA-cvs] cvs: loncom /build lpml_parse.pl doc/loncapafiles loncapafiles.lpml

albertel lon-capa-cvs-allow@mail.lon-capa.org
Sat, 02 Jun 2007 03:04:51 -0000


albertel		Fri Jun  1 23:04:51 2007 EDT

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/build	lpml_parse.pl 
  Log:
  - getting loncontrol to start at boottime on SuSE 10.2
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.544 doc/loncapafiles/loncapafiles.lpml:1.545
--- doc/loncapafiles/loncapafiles.lpml:1.544	Fri Jun  1 15:00:49 2007
+++ doc/loncapafiles/loncapafiles.lpml	Fri Jun  1 23:04:49 2007
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.544 2007/06/01 19:00:49 albertel Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.545 2007/06/02 03:04:49 albertel Exp $ -->
 
 <!--
 
@@ -6608,7 +6608,8 @@
 </description>
 </file>
 <link>
-<linkto>etc/rc.d/init.d/loncontrol</linkto>
+<linkto dist='default'>etc/rc.d/init.d/loncontrol</linkto>
+<linkto dist='suse10.2'>etc/init.d/loncontrol</linkto>
 <target dist='default'>
 etc/rc.d/rc0.d/K05loncontrol;
 etc/rc.d/rc1.d/K05loncontrol;
@@ -6618,10 +6619,26 @@
 etc/rc.d/rc5.d/S95loncontrol;
 etc/rc.d/rc6.d/K05loncontrol
 </target>
+<target dist='suse10.2'></target>
 <categoryname>symbolic link</categoryname>
 <description>
 symbolic links to /etc/rc.d/init.d/loncontrol for run-levels</description>
 </link>
+
+<file dist="suse10.2">
+  <source>loncom/init.d/loncontrol</source>
+  <target>etc/rc.d/</target>
+  <description>
+    setup loncontrol to run at boot
+  </description>
+  <installscript dist="suse10.2">
+-c 'chkconfig --del loncontrol;chkconfig loncontrol 345;chkconfig --list loncontrol'
+  </installscript>
+  <dependencies>
+loncom/init.d/loncontrol
+  </dependencies>
+</file>
+
 <file>
 <source>loncom/atalk/config</source>
 <target dist='default'>usr/local/loncapa/doc/conf_examples/config</target>
Index: loncom/build/lpml_parse.pl
diff -u loncom/build/lpml_parse.pl:1.54 loncom/build/lpml_parse.pl:1.55
--- loncom/build/lpml_parse.pl:1.54	Thu Jan 25 17:54:25 2007
+++ loncom/build/lpml_parse.pl	Fri Jun  1 23:04:51 2007
@@ -12,7 +12,7 @@
 # The LearningOnline Network with CAPA
 # lpml_parse.pl - Linux Packaging Markup Language parser
 #
-# $Id: lpml_parse.pl,v 1.54 2007/01/25 22:54:25 raeburn Exp $
+# $Id: lpml_parse.pl,v 1.55 2007/06/02 03:04:51 albertel Exp $
 #
 # Written by Scott Harrison, codeharrison@yahoo.com
 #
@@ -1297,15 +1297,23 @@
                 $buildtest.=<<END;
 	fi
 END
-	    }
+            }
 	    if ($installscript) {
 		my $dir = $sourceroot.'/'.$source;
 		$dir =~ s|/([^/]*)$||;
-		return <<"END";
-$buildtest	cd $dir ; sh $installscript\\
-		chmod -R $categoryhash{chmod.$categoryname} ${targetroot}/${target} \\
-		chown -R $categoryhash{chown.$categoryname} ${targetroot}/${target} \\
+		my $result =" 
+$buildtest	cd $dir ; sh $installscript";
+		if ($categoryname 
+		    && exists($categoryhash{"chmod.$categoryname"}) ) {
+		    $result .="\\\n";
+		    $result .=<<"END"
+		chmod -R $categoryhash{"chmod.$categoryname"} ${targetroot}/${target} \\
+		chown -R $categoryhash{"chown.$categoryname"} ${targetroot}/${target} 
 END
+                } else {
+		    $result.="\n";
+		}
+		return $result;
 	    }
             my $bflag='-b1';
             $bflag='-b3' if $dependencies or $buildlink;