summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-02-13 15:05:58 -0800
committerAndy Grover <agrover@redhat.com>2012-02-13 15:05:58 -0800
commit9ceddc99d91a7d8d5a60ec132685c78e62bcd7b7 (patch)
tree6b7fef09f78a98e8d38c0d7b23c87788207f4903 /scripts
parent1660805ca7b53c35044699c22aaa1b417e7a244d (diff)
downloadtargetcli-9ceddc99d91a7d8d5a60ec132685c78e62bcd7b7.tar.gz
Add auto_save_on_exit preference
Defaulted to true. Signed-off-by: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/targetcli5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/targetcli b/scripts/targetcli
index 3dd459f..9094e2e 100755
--- a/scripts/targetcli
+++ b/scripts/targetcli
@@ -44,6 +44,7 @@ class TargetCLI(ConfigShell):
'auto_enable_tpgt': True,
'auto_add_mapped_luns': True,
'auto_cd_after_create': True,
+ 'auto_save_on_exit': True,
}
def main():
@@ -79,6 +80,10 @@ def main():
''')
shell.con.display('')
shell.run_interactive()
+ if shell.prefs['auto_save_on_exit']:
+ shell.log.info("Global pref auto_save_on_exit=true")
+ root_node.ui_command_saveconfig()
+
if __name__ == "__main__":
main()