summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/design/external_special_remote_protocol.mdwn2
-rwxr-xr-xdoc/special_remotes/external/example.sh8
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn
index 6e3c468f4..b92110729 100644
--- a/doc/design/external_special_remote_protocol.mdwn
+++ b/doc/design/external_special_remote_protocol.mdwn
@@ -130,6 +130,8 @@ while it's handling a request.
* `PREPARE-SUCCESS`
Sent as a response to PREPARE once the special remote is ready for use.
+* `PREPARE-FAILURE ErrorMsg`
+ Sent as a response to PREPARE if the special remote cannot be used.
* `TRANSFER-SUCCESS STORE|RETRIEVE Key`
Indicates the transfer completed successfully.
* `TRANSFER-FAILURE STORE|RETRIEVE Key ErrorMsg`
diff --git a/doc/special_remotes/external/example.sh b/doc/special_remotes/external/example.sh
index 428e2ecb9..5152ccc28 100755
--- a/doc/special_remotes/external/example.sh
+++ b/doc/special_remotes/external/example.sh
@@ -112,10 +112,14 @@ while read line; do
# Use GETCONFIG to get configuration settings,
# and do anything needed to get ready for using the
# special remote here.
+ getcreds
getconfig directory
mydirectory="$RET"
- getcreds
- echo PREPARE-SUCCESS
+ if [ -d "$mydirectory" ]; then
+ echo PREPARE-SUCCESS
+ else
+ echo PREPARE-FAILURE "$mydirectory not found"
+ fi
;;
TRANSFER)
key="$3"