diff options
author | Linus Nordberg <linus@nordberg.se> | 2015-04-22 18:21:01 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2015-04-23 16:25:48 +0200 |
commit | 6758b2e36a058eb5b9a3c2ec719a36a48179225b (patch) | |
tree | 23d6d5042ec45031e132f8358e95b144a291393d /tools | |
parent | 0748083b2e61982108ad8c7375eaa6bef2ea4daa (diff) |
Replace halt.py with a more generic to_catlfish.py.
Use to_catlfish.py with "init:stop()".
This will be useful for stopping in non testing scenarios.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/to_catlfish.py (renamed from tools/halt.py) | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/halt.py b/tools/to_catlfish.py index 0cb43ed..00a359f 100755 --- a/tools/halt.py +++ b/tools/to_catlfish.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (c) 2014, NORDUnet A/S. +# Copyright (c) 2015, NORDUnet A/S. # See LICENSE for licensing information. import argparse @@ -12,12 +12,13 @@ import select parser = argparse.ArgumentParser(description='') parser.add_argument('toerl') parser.add_argument('nodedir') +parser.add_argument('command') args = parser.parse_args() p = subprocess.Popen( [args.toerl, args.nodedir], stdin=subprocess.PIPE) -p.stdin.write("halt().\n") +p.stdin.write(args.command + ".\n") p.stdin.flush() select.select([], [], [], 0.5) p.stdin.close() |