3 ػ$gN@s^ddlZdgZddlmZddlmZejZejZdZ d ddZ ddZ e d krZe dS) Nreboot) up2dateLog)configc Cs|rddifStdr ddifStj}ddi}dtjd d }|sy4|rftjd d d d d|gntjd d d d|gWn"tk rd|d<dd|fSXtjddd|fS)Nrzno-ops for cachingZnoReboot&z*Up2date is configured not to allow rebootsversion0zReboot of system "z'" initiated by Spacewalk reboot action.z/sbin/shutdownz-rz-kz+3zreboot.reboot.shutdown_failedname"z Could not execute /sbin/shutdownzRebooting the system nowzReboot sucessfully started)cfgosforkunameexecvpOSErrorlogZlog_me)testZ cache_onlypiddataZreboot_messager/usr/lib/python3.6/reboot.pyrs"    cCsttdddS)Nr )r)printrrrrrmain1sr__main__)NN) r Z __rhnexport__Zup2date_clientrrZinitUp2dateConfigr ZinitLogrZACTION_VERSIONrr__name__rrrr s