Browse Source

Update BORG_PASSCOMMAND example and clarify variable expansion. Fixes #4249

Manu 6 năm trước cách đây
mục cha
commit
d13ddb224a
3 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 1 1
      docs/faq.rst
  2. 2 1
      docs/man/borg.1
  3. 2 1
      docs/usage_general.rst.inc

+ 1 - 1
docs/faq.rst

@@ -329,7 +329,7 @@ Using ``BORG_PASSCOMMAND`` with a properly permissioned file
 
 
   Then in an automated script one can put::
   Then in an automated script one can put::
 
 
-    export BORG_PASSCOMMAND="cat ~/.borg-passphrase"
+    export BORG_PASSCOMMAND="cat $HOME/.borg-passphrase"
 
 
   and Borg will automatically use that passphrase.
   and Borg will automatically use that passphrase.
 
 

+ 2 - 1
docs/man/borg.1

@@ -354,7 +354,8 @@ See also BORG_NEW_PASSPHRASE.
 When set, use the standard output of the command (trailing newlines are stripped) to answer the
 When set, use the standard output of the command (trailing newlines are stripped) to answer the
 passphrase question for encrypted repositories.
 passphrase question for encrypted repositories.
 It is used when a passphrase is needed to access an encrypted repo as well as when a new
 It is used when a passphrase is needed to access an encrypted repo as well as when a new
-passphrase should be initially set when initializing an encrypted repo.
+passphrase should be initially set when initializing an encrypted repo. Note that the command
+is executed without a shell. So variables, like \fB$HOME\fP\ will work, but \fB~\fP\ won't.
 If BORG_PASSPHRASE is also set, it takes precedence.
 If BORG_PASSPHRASE is also set, it takes precedence.
 See also BORG_NEW_PASSPHRASE.
 See also BORG_NEW_PASSPHRASE.
 .TP
 .TP

+ 2 - 1
docs/usage_general.rst.inc

@@ -171,7 +171,8 @@ General:
         When set, use the standard output of the command (trailing newlines are stripped) to answer the
         When set, use the standard output of the command (trailing newlines are stripped) to answer the
         passphrase question for encrypted repositories.
         passphrase question for encrypted repositories.
         It is used when a passphrase is needed to access an encrypted repo as well as when a new
         It is used when a passphrase is needed to access an encrypted repo as well as when a new
-        passphrase should be initially set when initializing an encrypted repo.
+        passphrase should be initially set when initializing an encrypted repo. Note that the command
+        is executed without a shell. So variables, like ``$HOME`` will work, but ``~`` won't.
         If BORG_PASSPHRASE is also set, it takes precedence.
         If BORG_PASSPHRASE is also set, it takes precedence.
         See also BORG_NEW_PASSPHRASE.
         See also BORG_NEW_PASSPHRASE.
     BORG_PASSPHRASE_FD
     BORG_PASSPHRASE_FD