a '¡Dgã @sôUddlZddlZddlZddlZddlmZddlZddlmZm Z z0ddl Z e j Z ej e j e  e ¡d�Zeed<WnHeefy¾zddlmZejZWney¸dd„ZYn0Yn0e e¡ZGdd „d ejjjƒZGd d „d eƒZdS) éN)ÚAny)ÚsubpÚutil)ÚsaltÚ blowfish_hash)ÚbcryptcCs tdƒ‚dS)z¼Raise when called so that importing this module doesn't throw ImportError when this module is not used. In this case, crypt and passlib are not needed. z/crypt and passlib not found, missing dependencyN)Ú ImportError)Ú_©r úzt ddd|g¡Wn"ty8t td|¡‚Yn0dS)Nrú-CZyeszFailed to lock user %s©rr.rr/r'©rrr r r Ú lock_passwd“s  zNetBSD.lock_passwdcCs>zt ddd|g¡Wn"ty8t td|¡‚Yn0dS)Nrr8ÚnozFailed to unlock user %sr9r:r r r r6šs  zNetBSD.unlock_passwdNcCst d¡dS)NzCannot set the locale.)r'Údebug)rÚlocaleZout_fnr r r Ú apply_locale¡szNetBSD.apply_localecCs&t ¡}t ¡}dd|›d|›d�iS)z9Return env vars used in NetBSD package_command operationsZPKG_PATHz1http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/ú/z/All)ÚplatformÚreleaseÚmachine)rZ os_releaseZos_archr r r Ú_get_pkg_cmd_environ¤sÿÿþzNetBSD._get_pkg_cmd_environ)ÚforcecCsdS)Nr )rrEr r r Úupdate_package_sources¯szNetBSD.update_package_sources)F)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__Z ci_sudoers_fnZgroup_add_cmd_prefixZ#shadow_empty_locked_passwd_patternsrrÚboolr5r1r;r6r?rDrFÚ __classcell__r r rr r *s 9   r c@s eZdZdS)ÚDistroN)rGrHrIr r r r rM³srM)Ú functoolsZloggingrrAÚtypingrZcloudinit.distros.bsdZ cloudinitrrZcryptZMETHOD_BLOWFISHrÚpartialZmksaltrÚ__annotations__rÚAttributeErrorZ passlib.hashrÚhashZ getLoggerrGr'ZdistrosZbsdZBSDr rMr r r r Ús.  þ