summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-07-25 11:04:52 -0700
committerAndy Grover <agrover@redhat.com>2012-07-25 11:04:52 -0700
commitf88b663c520bddae035971a1bf19757af53d493d (patch)
treef09a0cb18cbe58e78ad30d53d0abb7831f81392c /scripts
parent5da74b689654e95b29dd38ea576fc2e2201ac982 (diff)
downloadtargetcli-f88b663c520bddae035971a1bf19757af53d493d.tar.gz
Don't try to save config if not root
It won't work and will print an ugly message. Signed-off-by: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/targetcli2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/targetcli b/scripts/targetcli
index 075b3df..3d5a34a 100755
--- a/scripts/targetcli
+++ b/scripts/targetcli
@@ -78,7 +78,7 @@ def main():
shell.con.display("You are not root, disabling privileged commands.\n")
shell.run_interactive()
- if shell.prefs['auto_save_on_exit']:
+ if shell.prefs['auto_save_on_exit'] and is_root:
shell.log.info("Global pref auto_save_on_exit=true")
root_node.ui_command_saveconfig()