MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openbsd.pyc
�
d�bc@s�ddljjZddljjjZddljjjZddljj	Z	ddl
mZddlm
Z
de
fd��YZdS(i����N(tResourceDiskError(tResourceDiskHandlertOpenBSDResourceDiskHandlercBs,eZd�Zd�Zd�Zd�ZRS(cCsAtt|�j�|jdks1|jdkr=d|_ndS(Ntufstufs2tffs(tsuperRt__init__tfs(tself((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openbsd.pyRscCsdS(N((R	tmount_pointtsize_mb((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openbsd.pytcreate_swap_space"scCsutj�}|rqtjd�|jjd�}tjdj|�dt	�\}}|rqtj
d|�qqndS(NsEnable swapisswapctl -a /dev/{0}btchk_errs Failed to enable swap, error {0}(tconftget_resourcedisk_swap_size_mbtloggertinfotosutiltdevice_for_ide_portt	shellutiltrun_get_outputtformattFalseterror(R	R
Rtdeviceterrtoutput((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openbsd.pytenable_swap%s
	cCsr|j}|dkr-tdj|���n|jjd�}|sTtd��ntjd|�dj|�}tjd�d}|jj	||�}|r�tjd|�|St
j|d	d
�dj|j||�}tj|dt
�}|rXtjd
j||��dj|�}	tj|	dt
�\}}
|r_tdj||
���ntj�}|r�|dkr�d}ndj|||�}tj|dt
�\}
}
|
r�tdj||
���q�ntjdj|��\}}
|rtdj||
���ntj|dt
�\}}
|rXtdj||
���qXntjd|||�|S(NRs<Unsupported filesystem type: {0}, only ufs/ffs is supported.is&Unable to detect resource disk device.sResource disk device {0} found.s	/dev/{0}atmounts$Resource disk {0} is already mountedtmodei�smount -t {0} {1} {2}R
sCreating {0} filesystem on {1}s/sbin/fdisk -yi {0}s+Failed to create new MBR on {0}, error: {1}iisJecho -e '{0} 1G-* 50%
swap 1-{1}M 50%' | disklabel -w -A -T /dev/stdin {2}s0Failed to create new disklabel on {0}, error {1}snewfs -O2 {0}as;Failed to create new filesystem on partition {0}, error {1}s(Failed to mount partition {0}, error {1}s=Resource disk partition {0} is mounted at {1} with fstype {2}ii(RRRRRRRRRtget_mount_pointtfileutiltmkdirtrunRRR(R	R
RRt	partitiont
mount_listtexistingt	mount_cmdRt	fdisk_cmdRRt
disklabel_cmdtret((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openbsd.pytmount_resource_disk0s`								
(t__name__t
__module__RRRR*(((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openbsd.pyRs			(tazurelinuxagent.common.loggertcommonRt%azurelinuxagent.common.utils.fileutiltutilsR t&azurelinuxagent.common.utils.shellutilRtazurelinuxagent.common.confRt azurelinuxagent.common.exceptionRt+azurelinuxagent.daemon.resourcedisk.defaultRR(((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openbsd.pyt<module>s