summaryrefslogtreecommitdiff
path: root/scripts/targetctl
Commit message (Collapse)AuthorAgeFilesLines
* Change to exporting under 'rtslib' and 'rtslib_fb" pkg namesAndy Grover2014-12-021-1/+1
| | | | | | | | | We should move off of 'rtslib' because we are incompatible with the original package using this name. Export as 'rtslib_fb', and add a warning to switch to importing by the new package name if using the old import name. Signed-off-by: Andy Grover <agrover@redhat.com>
* Add a message if no configfile is foundAndy Grover2014-02-181-1/+2
| | | | | | | | | Add a print (to stdout, not stderr) if no config file is found, but try not to make it too scary, since this is perfectly fine. Fix typo in comment. Signed-off-by: Andy Grover <agrover@redhat.com>
* targetctl: A missing restore file is not an errorAndy Grover2014-02-131-5/+10
| | | | | | Also, fix whitespace. Signed-off-by: Andy Grover <agrover@redhat.com>
* targetctl: fix restoreJohannes Dewender2013-11-021-2/+1
| | | | | | | There is no clear_existing argument. restore_from_file() always clears the config first. Signed-off-by: Johannes Dewender <github@JonnyJD.net>
* Add save_to_file and restore_from_fileAndy Grover2013-10-281-24/+5
| | | | | | | | | | | | | Push down the ability to save/restore state to/from a file, from targetcli to rtslib. This will let us coordinate access from multiple API users (targetd, targetcli, targetctl) to ensure atomicity, and also make targetcli an optional installed component if the user is not using it. Modify targetctl to use the new APIs. Since various exceptions set return status to 1, targetctl should still properly be setting nonzero exit status so scripts can check it. Signed-off-by: Andy Grover <agrover@redhat.com>
* Add a 'clear' command to targetctlAndy Grover2013-10-281-1/+5
| | | | | | | | | It seems like this might be useful. If restore has errors, it will result in a partially applied configuration. Maybe this what the user wants, or maybe they'd just as soon have no configuration if any part of it fails. If so, 'clear' to the rescue if exit status from 'restore' is nonzero. Signed-off-by: Andy Grover <agrover@redhat.com>
* Consolidate save/restore scripts into a single scriptAndy Grover2013-10-281-0/+97
Eliminates some duplicate code and has a better name. Still not using configparser yet, hopefully we won't need it. Signed-off-by: Andy Grover <agrover@redhat.com>