
    ds                     P    d dl mc mZ d dlmc mc mZ d dlmZ  G d de      Zy)    N)DefaultOSUtilc                   >     e Zd Z fdZd Zd ZddZd Zd Z xZ	S )AlpineOSUtilc                 F    t         t        |           d| _        d| _        y )Nz/etc/waagent.confT)superr   __init__agent_conf_file_pathjit_enabled)self	__class__s    F/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/alpine.pyr   zAlpineOSUtil.__init__   s     lD*,$7!    c                      y)NT r   s    r   is_dhcp_enabledzAlpineOSUtil.is_dhcp_enabled   s    r   c                 (    | j                  ddg      S )Npidofdhcpcd)_get_dhcp_pidr   s    r   get_dhcp_pidzAlpineOSUtil.get_dhcp_pid"   s    !!7H"566r   c                     t        j                  dj                  |             | j                         }|d k7  r%t	        j
                  dj                  |            }y y )Nz2restarting {} (sort of, actually SIGHUPing dhcpcd)zkill -HUP {})loggerinfoformatr   	shellutilrun_get_output)r   ifnameretrieswaitpidrets         r   
restart_ifzAlpineOSUtil.restart_if%   sP    HOOPVWX!$;**>+@+@+EFC r   c                      y Nr   r   s    r   set_ssh_client_alive_intervalz*AlpineOSUtil.set_ssh_client_alive_interval+       r   c                      y r%   r   )r   disable_passwords     r   	conf_sshdzAlpineOSUtil.conf_sshd/   r'   r   )NN)
__name__
__module____qualname__r   r   r   r#   r&   r*   __classcell__)r   s   @r   r   r      s"     
7Gr   r   )	azurelinuxagent.common.loggercommonr   &azurelinuxagent.common.utils.shellutilutilsr   %azurelinuxagent.common.osutil.defaultr   r   r   r   r   <module>r4      s"   ( / . : : ?= r   