summaryrefslogtreecommitdiff
path: root/tools/halt.py
blob: cfbf14e2b498606655da163a541af0062dffff8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014, NORDUnet A/S.
# See LICENSE for licensing information.

import argparse
import subprocess
import sys

parser = argparse.ArgumentParser(description='')
parser.add_argument('toerl')
parser.add_argument('nodedir')
args = parser.parse_args()

p = subprocess.Popen(
    [args.toerl, args.nodedir],
    stdin=subprocess.PIPE)
p.communicate("halt().\n")