def set_boot_script(self, filename):
data = {}<EOL>with open(filename) as f:<EOL><INDENT>data['<STR_LIT>'] = f.read()<EOL><DEDENT>j, r = self.datacenter.request('<STR_LIT:POST>', self.path + '<STR_LIT>', <EOL>data=data)<EOL>r.raise_for_status()<EOL>self.boot_script = data['<STR_LIT>']<EOL>
::

    POST /:login/machines/:id/metadata

:param filename: file path to the script to be uploaded and executed
    at boot on the machine
:type filename: :py:class:`basestring`

Replace the existing boot script for the machine with the data in the 
named file.

.. Note:: The SMF service that runs the boot script will kill processes
   that exceed 60 seconds execution time, so this is not necessarily 
   the best vehicle for long ``pkgin`` installations, for example.