]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Tweak lsh's Usage message & opening comment.
authorWayne Davison <wayne@opencoder.net>
Mon, 13 Jul 2020 19:01:00 +0000 (12:01 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 13 Jul 2020 19:01:00 +0000 (12:01 -0700)
support/lsh

index 40f70c88b0889b8904bc25606c4df2b5e78fdab3..be29310c7b401677068a8fd7daf72cce441696a7 100755 (executable)
@@ -1,10 +1,6 @@
 #!/usr/bin/env perl
-# This script can be used as a "remote shell" command that is only
-# capable of pretending to connect to "localhost".  This is useful
-# for testing or for running a local copy where the sender and the
-# receiver needs to use different options (e.g. --fake-super).  If
-# we get -l USER, we try to become the USER, either directly (must
-# be root) or by using "sudo -H -u USER" (requires --sudo option).
+# This is a "local shell" command that works like a remote shell but only for
+# the local host.  See the usage message for more details.
 
 use strict;
 use warnings;
@@ -78,9 +74,15 @@ die "Failed to exec: $!\n";
 sub usage
 {
     die <<EOT;
-Usage: lsh [-l user] [--sudo] [--no-cd] localhost COMMAND [...]
+Usage: lsh [-l USER] [--sudo] [--no-cd] localhost COMMAND [...]
 
-Note that if you pass hostname "lh" instead of "localhost" that
-the --no-cd option is implied.
+This is a "local shell" command that works like a remote shell but only for the
+local host.  This is useful for rsync testing or for running a local copy where
+the sender and the receiver need to use different options (e.g. --fake-super).
+If the -l option is used, we try to become the USER, either directly (when
+root) or by using "sudo -H -u USER" (requires --sudo option).
+
+Note that if you pass hostname "lh" instead of "localhost" that the --no-cd
+option is implied.  The default is to "cd \$HOME" to simulate ssh behavior.
 EOT
 }