def set_boot_script(self, filename):
        """
        ::
        
            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.
        """
        data = {}
        with open(filename) as f:
            data['user-script'] = f.read()
        j, r = self.datacenter.request('POST', self.path + '/metadata', 
                    data=data)
        r.raise_for_status()
        self.boot_script = data['user-script']