summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2015-04-08 11:56:57 -0700
committerAndy Grover <agrover@redhat.com>2015-04-08 11:56:57 -0700
commit70fd2ef47176239af91155e445fc106d18253afb (patch)
treefb7d5fa253b9e0da01a9818749c7f406b5532a82
parente1808aef9638ab580a2dc1da9372fa1f10b1acc4 (diff)
downloadrtslib-fb-70fd2ef47176239af91155e445fc106d18253afb.tar.gz
Do not fail if there were recoverable errors on restore
There may be some changes in attributes that cause previously correct values to return with -EINVAL. Report these via stderr but do not return -1, because this will cause systemd to count the entire service start as having failed. Signed-off-by: Andy Grover <agrover@redhat.com>
-rwxr-xr-xscripts/targetctl9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/targetctl b/scripts/targetctl
index 9d02b91..3920558 100755
--- a/scripts/targetctl
+++ b/scripts/targetctl
@@ -50,13 +50,8 @@ def restore(from_file):
print("No saved config file at %s, ok, exiting" % from_file)
sys.exit(0)
- if errors:
- print("Restore failed, %d errors:" % len(errors), file=err)
-
- for error in errors:
- print(error, file=err)
-
- sys.exit(-1)
+ for error in errors:
+ print(error, file=err)
def clear(unused):
RTSRoot().clear_existing(confirm=True)