Lines Matching refs:os
14 import os
56 if os.uname()[0] == 'SunOS':
67 if os.uname()[0] == 'SunOS':
81 if not os.path.exists(self.tmpdir):
82 os.makedirs(self.tmpdir, 0750)
88 url = os.path.join(self.srcdir, filename)
90 … local_name = os.path.join(self.tmpdir, 'xenpvboot.%s.%s' % (os.path.basename(filename), suffix))
104 if stat.S_ISBLK(os.stat(self.location)[stat.ST_MODE]):
108 if os.uname()[0] == 'SunOS':
115 os.rmdir(self.srcdir)
129 nfs = os.path.dirname(self.location[8:])
130 iso = os.path.basename(self.location[8:])
133 if os.uname()[0] == 'SunOS':
135 mount(os.path.join(self.nfsdir, iso), self.srcdir, option)
142 os.rmdir(self.nfsdir)
156 … local_name = os.path.join(self.tmpdir, 'xenpvboot.%s.%s' % (os.path.basename(filename), suffix))
157 cmd = '/usr/bin/tftp %s -c get %s %s' % (host, os.path.join(basedir, filename), local_name)
212 fd = os.open(opts.output, os.O_WRONLY)
221 or (os.path.exists(location) and os.path.isdir(location))):
223 elif location.startswith('nfs:') or (os.path.exists(location) and not os.path.isdir(location)):
287 os.write(fd, output)