ia64/xen-unstable

view tools/xend/xend @ 1372:5a6113c65ead

bitkeeper revision 1.891.1.12 (40a248b0WTGoOa9206iWkyGN0mTPNw)

Allow forcing of IRQ trigger-type to edge or level
(NB. DANGEROUS!).
author kaf24@scramble.cl.cam.ac.uk
date Wed May 12 15:54:24 2004 +0000 (2004-05-12)
parents 9a94605e84aa
children
line source
1 #!/usr/bin/env python
3 import os, sys, xend.main
5 def main():
6 if not sys.argv[1:]:
7 print 'usage: %s {start|stop|restart}' % sys.argv[0]
8 elif os.fork():
9 pid, status = os.wait()
10 return status >> 8
11 elif sys.argv[1] == 'start':
12 return xend.main.start_daemon()
13 elif sys.argv[1] == 'stop':
14 return xend.main.stop_daemon()
15 elif sys.argv[1] == 'restart':
16 return xend.main.stop_daemon() or xend.main.start_daemon()
17 else:
18 print 'not an option:', sys.argv[1]
19 return 1
21 if __name__ == '__main__':
22 sys.exit(main())