Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
boto
/
pyami
/
File Content:
bootstrap.pyc
� �Wc @ s� d d l Z d d l Z d d l m Z m Z d d l m Z m Z d d l m Z d d l Z d e f d � � YZ e d k r� e j d d � e � Z e j � n d S( i����N( t get_instance_metadatat get_instance_userdata( t Configt BotoConfigPath( t ScriptBaset Bootstrapc B sM e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s\ The Bootstrap class is instantiated and run as part of the PyAMI instance initialization process. The methods in this class will be run from the rc.local script of the instance and will be run as the root user. The main purpose of this class is to make sure the boto distribution on the instance is the one required. c C s* d | _ | j � t t | � j � d S( Ns /mnt/pyami( t working_dirt write_metadatat superR t __init__( t self( ( s8 /usr/lib/python2.7/site-packages/boto/pyami/bootstrap.pyR ( s c C s� t t j j t � d � } | j d � t � } x) | D]! } | j d | | | f � q8 Wt � } | j d | � | j d � | j d | j � | j � t � t _ t j � d S( Nt ws [Instance] s %s = %s s %s s [Pyami] s working_dir = %s ( t opent ost patht expanduserR t writeR R R t closeR t botot configt init_logging( R t fpt inst_datat keyt user_data( ( s8 /usr/lib/python2.7/site-packages/boto/pyami/bootstrap.pyR - s c C sC t j j d | j � t j j | j � s? t j | j � n d S( Ns Working directory: %s( R t logt infoR R R t existst mkdir( R ( ( s8 /usr/lib/python2.7/site-packages/boto/pyami/bootstrap.pyt create_working_dir>