[slbackup-commit] CVS update: slbackup-php/src functions.php index.php

finnarne-guest at alioth.debian.org finnarne-guest at alioth.debian.org
Fri Apr 13 22:16:30 UTC 2007


  User: finnarne-guest
  Date: 07/04/13 22:16:30

  Modified:    src      functions.php index.php
  Log:
  readlog is not ready to be used just yet
  
  Revision  Changes    Path
  1.4       +2 -3      slbackup-php/src/functions.php
  
  Index: functions.php
  ===================================================================
  RCS file: /cvsroot/slbackup/slbackup-php/src/functions.php,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- functions.php	13 Apr 2007 22:12:22 -0000	1.3
  +++ functions.php	13 Apr 2007 22:16:30 -0000	1.4
  @@ -19,8 +19,8 @@
   */
   
   function loadConfig () {
  -    global $backuphost, $backupuser, $backupconf, $backupcron,
  -           $ssh_options, $logfile, $smarty_templ, $smarty_compile ; 
  +    global $backuphost, $backupuser, $backupconf, $backupcron, $ssh_options,
  +           $smarty_templ, $smarty_compile ; 
   
       @include_once ("/etc/slbackup/config.php") ; 
   
  @@ -32,7 +32,6 @@
       if (empty ($backupconf)) $backupconf="/etc/slbackup/slbackup.conf" ; 
       if (empty ($backupcron)) $backupcron="/etc/cron.d/slbackup" ; 
       if (empty ($ssh_options)) $ssh_options="-o StrictHostKeyChecking=no" ; 
  -    if (empty ($logfile)) $logfile="/var/log/slbackup/slbackup.log" ; 
   
   
       if (empty ($smarty_templ)) {
  
  
  
  1.12      +0 -39     slbackup-php/src/index.php
  
  Index: index.php
  ===================================================================
  RCS file: /cvsroot/slbackup/slbackup-php/src/index.php,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- index.php	13 Apr 2007 22:12:22 -0000	1.11
  +++ index.php	13 Apr 2007 22:16:30 -0000	1.12
  @@ -176,42 +176,6 @@
       return $config ; 
   }
   
  -function readlog ($passwd) {
  -global $backuphost, $backupuser, $logfile, $ssh_options, $ssh_askpass ;
  -
  -    $log = array () ; 
  -    $cmd = sprintf ("ssh %s %s@%s cat %s", 
  -   		     $ssh_options, $backupuser, 
  -		     $backuphost, $logfile) ; 
  -
  -    $desc[0] = array ("pipe", "r") ; 
  -    $desc[1] = array ("pipe", "w") ; 
  -    $desc[2] = array ("file", "/tmp/error.log", "a") ; 
  -
  -    $env = array ('SSH_ASKPASS' => $ssh_askpass, 
  -		  'DISPLAY' => ':nowhere') ; 
  -    $proc = proc_open ($cmd, $desc, $pipes, '/tmp', $env) ; 
  -    if (is_resource ($proc)) {
  -	fprintf ($pipes[0], "%s\n", $passwd) ; 
  -	fclose ($pipes[0]) ; 
  -	while ($line = fgets ($pipes[1], 1024)) {
  -	    if (strpos ($line, "Starting slbackup") !== false)
  -		$log["start"] = $line ; 
  -	    if (strpos ($line, "Finished slbackup") !== false)
  -		$log["end"] = $line ; 
  -	    if (strpos ($line, "Starting backup of client") !== false)
  -		$log["clientstart"] = $line ; 
  -	    if (strpos ($line, "Failed backing up client") !== false)
  -		$log["clientfailed"] = $line ; 
  -	    if (strpos ($line, "Successfully finished backing up client") !== false)
  -		$log["clientok"] = $line ; 
  -        }
  -	fclose ($pipes[1]) ; 
  -	proc_close ($proc) ; 
  -    }
  -    return $log ; 
  -}
  -
   require_once ('functions.php') ; 
   loadConfig () ;
   require('/usr/share/php/smarty/libs/Smarty.class.php') ; 
  @@ -296,9 +260,6 @@
       sscanf ($array[1], "%d", $config["hours"]) ; 
   }
   switch ($submit) {
  -    case "status":
  -        debug (readlog ($passwd)) ; 
  -        break ; 
       case "scheduler": 
           $newsched = "" ; 
           foreach ($scheduler as $line) {
  
  
  



More information about the slbackup-commit mailing list