Changeset 293

Show
Ignore:
Timestamp:
11/24/06 19:57:07 (6 years ago)
Author:
lincoln
Message:

begin seperation of admin_status from operational status (laststatus)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/shepherd

    r291 r293  
    290290        &log("$proggy v$latestversion failed ready test - marking as a pending update.\n"); 
    291291        $components_pending_install->{$proggy}->{config} = $config; 
     292        $components_pending_install->{$proggy}->{updated} = time; 
     293 
     294        if (defined $components->{$proggy}) { 
     295            $components->{$proggy}->{admin_status} = sprintf "update to version %s pending: %s", 
     296                $latestversion, $components_pending_install->{$proggy}->{admin_status}; 
     297        } 
     298 
    292299        return; 
    293300    } 
     
    305312    $components->{$proggy}->{ver} = $latestversion; 
    306313    $components->{$proggy}->{config} = $config; 
    307     $components->{$proggy}->{laststatus} = sprintf "updated to %s on %s", $latestversion, POSIX::strftime("%a%d%b%y",localtime(time)); 
     314    $components->{$proggy}->{updated} = time; 
     315    $components->{$proggy}->{admin_status} = sprintf "updated from %s to %s", $oldver, $latestversion; 
    308316    delete $components_pending_install->{$proggy} if (defined $components_pending_install->{$proggy}); 
    309317 
     
    397405        # mark as successful but only if previously unsuccessful 
    398406        # (we only mark it if it was previously unsuccessful otherwise a --check 
    399         # will result in clearing out all of the laststatus fields) 
     407        # will result in clearing out all of the admin_status fields) 
    400408        $statusmsg = sprintf "tested successfully on %s", POSIX::strftime("%a%d%b%y", localtime(time)) 
    401409          if ((defined $components->{$proggy}->{ready}) && (!$components->{$proggy}->{ready})); 
     
    405413    if ((defined $statusmsg) && ($statusmsg ne "")) { 
    406414        if ((defined $specific_version) && ($specific_version ne "")) { 
    407             $components_pending_install->{$proggy}->{laststatus} = $statusmsg; 
     415            $components_pending_install->{$proggy}->{admin_status} = $statusmsg; 
    408416        } else { 
    409             $components->{$proggy}->{laststatus} = $statusmsg; 
     417            $components->{$proggy}->{admin_status} = $statusmsg; 
    410418        } 
    411419    } 
     
    427435 
    428436    delete $components->{$proggy}->{disabled}; 
    429     $components->{$proggy}->{laststatus} = sprintf "enabled on %s, not run yet",POSIX::strftime("%a%d%b%y", localtime(time)); 
     437    $components->{$proggy}->{admin_status} = sprintf "enabled on %s",POSIX::strftime("%a%d%b%y", localtime(time)); 
    430438} 
    431439 
     
    449457    $n ||= 1; 
    450458    $components->{$proggy}->{disabled} = $n; 
    451     $components->{$proggy}->{laststatus} = sprintf "manually disabled on %s",POSIX::strftime("%a%d%b%y", localtime(time)); 
     459    $components->{$proggy}->{admin_status} = sprintf "manually disabled on %s",POSIX::strftime("%a%d%b%y", localtime(time)); 
    452460} 
    453461