diff options
| author | Andy Grover <agrover@redhat.com> | 2012-05-31 11:09:21 -0700 |
|---|---|---|
| committer | Andy Grover <agrover@redhat.com> | 2012-05-31 11:09:21 -0700 |
| commit | b9855e0cff79feacfeb04a3c75752d744238ea88 (patch) | |
| tree | e891d822b19846c0cc5c3fdd2812d9964728220a /scripts | |
| parent | 7e638636c012c771ac522b4444a46fbd56031d83 (diff) | |
| download | targetcli-b9855e0cff79feacfeb04a3c75752d744238ea88.tar.gz | |
Made startup message less verbose, display version
[original comments from 5bcef69]
* Now displaying targetcli / rtslib version on startup
* Retained only copyright notice.
[end]
fb changes:
- only display targetcli version, we don't have rtslib version in code
- move later to only display if entering shell
- remove extraneous copyright verbiage
- add "and others" to be explicit about our derived-work status
Signed-off-by: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/targetcli | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/targetcli b/scripts/targetcli index 9094e2e..b65be47 100755 --- a/scripts/targetcli +++ b/scripts/targetcli @@ -25,6 +25,7 @@ from targetcli import UIRoot from rtslib import RTSLibError from configshell import ConfigShell import sys +from targetcli import __version__ as targetcli_version class TargetCLI(ConfigShell): default_prefs = {'color_path': 'magenta', @@ -57,9 +58,6 @@ def main(): is_root = False shell = TargetCLI('~/.targetcli') - if not is_root: - shell.con.display('You are not root, disabling privileged commands.') - shell.con.display('') root_node = UIRoot(shell, as_root=is_root) @@ -72,13 +70,13 @@ def main(): shell.run_cmdline(" ".join(sys.argv[1:])) sys.exit(0) - shell.con.epy_write(''' - Welcome to the B{targetcli} shell:: - Copyright (c) 2011 by RisingTide Systems LLC.\n - For help on commands, type 'help'. + shell.con.display("targetcli shell version %s\n" + "Copyright 2011 by RisingTide Systems LLC and others.\n" + "For help on commands, type 'help'.\n" + % targetcli_version) + if not is_root: + shell.con.display("You are not root, disabling privileged commands.\n") - ''') - shell.con.display('') shell.run_interactive() if shell.prefs['auto_save_on_exit']: shell.log.info("Global pref auto_save_on_exit=true") |
