summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJerome Martin <jxm@risingtidesystems.com>2011-06-14 21:45:03 +0200
committerJerome Martin <jxm@risingtidesystems.com>2011-07-18 17:43:22 +0200
commite83faf72fae59ea85272874753e06d8c6313d219 (patch)
tree3264e30a95bbb803666388a4f582311341835406 /scripts
parentccb88b277e88a566c8e84f3e44d5aaf3104da1e8 (diff)
downloadtargetcli-e83faf72fae59ea85272874753e06d8c6313d219.tar.gz
Converted to refactored ConfigShell/Node layout.
* Now using console, log, prefs through shell. * Root node binds to shell, not the other way. * Replaced del_child() calls by remove_child() * Replaced a children loop scan by ConfigNode get_child() method.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rtsadmin15
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/rtsadmin b/scripts/rtsadmin
index 832c798..b010823 100755
--- a/scripts/rtsadmin
+++ b/scripts/rtsadmin
@@ -54,18 +54,21 @@ def main():
is_root = True
else:
is_root = False
- root_node = UIRoot(as_root=is_root)
- shell = RTSAdmin(root_node, '~/.rtsadmin')
- shell.con.epy_write('Welcome to the B{RTSAdmin Community Edition} CLI.')
- shell.con.display('')
- shell.con.epy_write('Copyright (c) 2011 by RisingTide Systems LLC.')
- shell.con.epy_write('Visit us at U{http://www.risingtidesystems.com}.')
+ shell = RTSAdmin('~/.rtsadmin')
+ shell.con.epy_write('''
+ Welcome to the B{rtsadmin Community Edition} CLI::
+ Copyright (c) 2011 by RisingTide Systems LLC.
+
+ Visit us at U{http://www.risingtidesystems.com}.
+ ''')
shell.con.display('')
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)
+
try:
root_node.refresh()
except RTSLibError, error: