| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/landscape/monitor/ |
Upload File : |
ó
}9Rc @ sX d d l Z d d l Z d d l m Z d d l m Z d Z d e f d „ ƒ YZ d S( iÿÿÿÿN( t read_file( t
MonitorPlugins /var/run/reboot-requiredt RebootRequiredc B sY e Z d Z d Z d Z e Z e d „ Z d „ Z d „ Z
d „ Z d „ Z d „ Z
RS( s±
Report whether the system requires a reboot.
@param reboot_required_filename: The path to the flag file that indicates
if the system needs to be rebooted.
s reboot-requiredi„ c C s | | _ | d | _ d S( Ns .pkgs( t _flag_filenamet _packages_filename( t selft reboot_required_filename( ( sD /usr/lib/python2.7/dist-packages/landscape/monitor/rebootrequired.pyt __init__ s c C s t j j | j ƒ S( s@ Return a boolean indicating whether the computer needs a reboot.( t ost patht existsR ( R ( ( sD /usr/lib/python2.7/dist-packages/landscape/monitor/rebootrequired.pyt _get_flag s c C sN t j j | j ƒ s g St | j ƒ j ƒ } t d „ | Dƒ ƒ } t | ƒ S( s; Return the list of packages that required a reboot, if any.c s s* | ] } | r | j ƒ j d ƒ Vq d S( s utf-8N( t stript decode( t .0t line( ( sD /usr/lib/python2.7/dist-packages/landscape/monitor/rebootrequired.pys <genexpr>% s ( R R R
R R t
splitlinest sett sorted( R t linest packages( ( sD /usr/lib/python2.7/dist-packages/landscape/monitor/rebootrequired.pyt
_get_packages s
c C s† i } | j ƒ } | j ƒ } xa d | f d | f g D]G \ } } | | j j | ƒ k ra q7 n | j j | | ƒ | | | <q7 W| S( s: Return the body of the reboot-required message to be sent.t flagR ( R R t _persistt getR ( R t messageR R t keyt value( ( sD /usr/lib/python2.7/dist-packages/landscape/monitor/rebootrequired.pyt _create_message( s %c C sI | j ƒ } | rE d | d <t j d ƒ | j j j | d t ƒn d S( s˜ Send a reboot-required message if needed.
A message will be sent only if the reboot-required status of the
system has changed.
s reboot-required-infot types5 Queueing message with updated reboot-required status.t urgentN( R t loggingt infot registryt brokert send_messaget True( R R ( ( sD /usr/lib/python2.7/dist-packages/landscape/monitor/rebootrequired.pyR# 4 s
c C s | j j j d | j ƒ S( s9 Send reboot-required messages if the server accepts them.s reboot-required-info( R! R"