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/openwrt.pyc
�
d�bc@s�ddlZddlmZddljjZddljjjZddl	jjj
Z
ddljjZddl
mZddlmZdefd��YZdS(i����N(tsleep(tResourceDiskError(tResourceDiskHandlertOpenWRTResourceDiskHandlercBs#eZd�Zd�Zd�ZRS(cCsAtt|�j�|jdks1|jdkr=d|_ndS(Ntufstufs2tffs(tsuperRt__init__tfs(tself((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openwrt.pyRscCsDtjdj|�dt�\}}|dkr@tjd�ndS(Ns
hdparm -z {0}tchk_erris#Failed refresh the partition table.(t	shellutiltrun_get_outputtformattFalsetloggertwarn(R
tdevicetrettoutput((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openwrt.pytreread_partition_table%s$cCsu|jjd�}|dkr-td��ntjd|�dj|�}|d}tjd|�tjd�d}|jj	||�}|r�tjd||�|Syt
j|d	d
�WnGtk
r}dj||�}tj
|�td|d
|��nXd}|jdkr*d}ndj|j||�}	|jdtddj|��}
|
dj�}|dkr�|jdkr�tjd�|jdtddj|��|j|�tjd|	�tj|	�ntjd|�tj�}|j|||�}
d}xJtjj|�rj|dkrjtjd||�td�|d8}q!Wtjj|�s�tdj|���ntjj|�r�tjd|�n�tjd �|j|�tjd!|
�tj|
�\}
}|
rXtjd"|�tj|	�tj|
�\}
}|
rXtd#j||
|���qXntjd$|||j�|S(%Nisunable to detect disk topologysResource disk device {0} found.s/dev/{0}t1s"Resource disk partition {0} found.tmounts,Resource disk [{0}] is already mounted [{1}]tmodei�s1Failed to create mount point directory [{0}]: {1}tmsgtinnertFtxfstfsmkfs.{0} -{2} {1}tsuppress_messaget
option_strs{0} 1 -nt7tntfssCThe partition is formatted with ntfs, updating partition type to 83s{0} 1 83sFormat partition [{0}]sThe partition type is {0}iis3Waiting for partition [{0}], {1} attempts remainingsPartition was not created [{0}]sDisk is already mounted on {0}s)Mounting after re-reading partition info.sMount resource disk [{0}]sJFailed to mount resource disk. Attempting to format and retry mount. [{0}]s<Could not mount {0} after syncing partition table: [{1}] {2}s,Resource disk {0} is mounted at {1} with {2}(tosutiltdevice_for_ide_porttNoneRRtinfoRRR
tget_mount_pointtfileutiltmkdirtOSErrorterrorR	tchange_partition_typetTruetstripRRtruntconftget_resourcedisk_mountoptionstget_mount_stringtostpathtexistsRtismountR(R
tmount_pointRt	partitiont
mount_listtexistingtoseRtforce_optiontmkfs_stringRtptypet
mount_optionstmount_stringtattemptsR((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openwrt.pytmount_resource_disk*s�
	
	!

		"	


	
		
(t__name__t
__module__RRRA(((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openwrt.pyRs		(R2ttimeRtazurelinuxagent.common.loggertcommonRt%azurelinuxagent.common.utils.fileutiltutilsR't&azurelinuxagent.common.utils.shellutilRtazurelinuxagent.common.confR/t azurelinuxagent.common.exceptionRt+azurelinuxagent.daemon.resourcedisk.defaultRR(((sO/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/resourcedisk/openwrt.pyt<module>s