Lines Matching refs:command

59 # Run an external command.
60 def runCommand(command, inputVal=''):
61 print "%>", ' '.join(command)
62 proc = Popen(command, stdin=PIPE)
66 # Run an external command and capture its output. This is intended to be
68 def getOutput(command, inputVal=''):
71 print "%>", ' '.join(command)
72 proc = Popen(command, stderr=STDOUT,
77 # Run a command as root, using sudo if necessary.
78 def runPriv(command, inputVal=''):
79 realCommand = command
81 realCommand = [findProg('sudo')] + command
84 def privOutput(command, inputVal=''):
85 realCommand = command
87 realCommand = [findProg('sudo')] + command
112 command = [findProg('losetup'), self.devFile, fileName]
115 command = command[:1] + \
117 command[1:]
118 return runPriv(command)
131 command = [findProg('sfdisk'), '-d', dev.devFile]
132 (out, returncode) = privOutput(command)
199 exit('Unimplemented command %s!' % self.name)
203 # A command which prepares an image with an partition table and an empty file
212 # A command to mount the first partition in the image.
232 # A command to unmount the first partition in the image.
256 # A command to create an empty file to hold the image.
280 # A command to partition the image file like a raw disk device.
310 # A command to format the first partition in the image.
358 # Figure out what command was requested and execute it.
360 print 'Usage: %s [command] <command arguments>'
361 print 'where [command] is one of '
363 command = commands[name]
364 print ' %s: %s' % (command.name, command.description)
370 command = commands[argv[1]]
371 command.parseArgs(argv)
372 command.runCom()