Hi Folks

I have a LEAF box with multiple personalities, controlled through
multiple leaf.cfg files which define different configdb files.

Backing up the configdb works fine with lrcfg but fails miserably with
the webconf interface. The problem appears to be the parameter passing
in the file lrcfg.back.cgi.

The following patch fixes the problem for me

>>>>>>>>>>>>>>>> feed to patch >>>>>>>>>>>>>>>>>>>>>

--- lrcfg.back.cgi.old  2006-11-17 18:49:44.000000000 +0100
+++ lrcfg.back.cgi      2007-08-24 14:22:14.872823587 +0200
@@ -11,6 +11,7 @@
        fi
 title="Commit Changes to Read/Write Media"
/var/webconf/lib/preamble.sh  ?>
 <!-- $Id: lrcfg.back.cgi,v 1.3 2006/09/12 17:57:25 espakman Exp $ -->
+<!-- patched for variable CONFIGDB values by Erich Titl
[EMAIL PROTECTED]  -->

 <? # lrcfg.back settings
   SESSIONID=${FORM_SESSIONID:-${SESSIONID}}
@@ -85,7 +86,7 @@

                build_lrp () {
                        # use apkg $1 to build the package in /tmp
-                       apkg $1 /tmp  2>&1 1>/dev/null
+                       apkg $1 $2 /tmp  2>&1 1>/dev/null
                        if ! [ -r /tmp/$2.lrp ]; then
                                log "Red" "The package was not created
in /tmp!"
                                return 1
@@ -206,7 +207,7 @@
        echo ">"
        # The name comes from /var/lib/lrpkg/backup
        echo "<td>"
-       grep "^${x}" /var/lib/lrpkg/backup 2>/dev/null | cut -f2 -d= ||
echo ${x}
+       grep "^${x}" /var/lib/lrpkg/backup 2>/dev/null | cut -f1 -d= ||
echo ${x}
        echo "</td><td align=left>$( eval echo \$${x}_descr)</td>"
        echo "</tr>"
        done

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

cheers

Erich

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

_______________________________________________
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to