summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-01-15 18:25:54 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2017-01-15 18:25:54 +0100
commitca47fef0061954cda2355cc10dba774d6567051e (patch)
treeef97c601c3e81846e08f8e941e7c5c3d51160843
parente9bf14ecebd1f7b91968b10cec05620dd338ac0f (diff)
downloadplan9front-ca47fef0061954cda2355cc10dba774d6567051e.tar.xz
rcpu: use $cpu environment variable for host when not specified
-rwxr-xr-xrc/bin/rcpu1
-rw-r--r--sys/man/1/rcpu7
2 files changed, 8 insertions, 0 deletions
diff --git a/rc/bin/rcpu b/rc/bin/rcpu
index 01e388ee6..8ea3fcfd6 100755
--- a/rc/bin/rcpu
+++ b/rc/bin/rcpu
@@ -52,6 +52,7 @@ fn client {
cmd=()
host='$cpu'
+if(~ $#cpu 1) host=$cpu
exportfs=/bin/exportfs
connect=/bin/rconnect
diff --git a/sys/man/1/rcpu b/sys/man/1/rcpu
index c096c090b..edafa8cfc 100644
--- a/sys/man/1/rcpu
+++ b/sys/man/1/rcpu
@@ -105,6 +105,13 @@ set to
to allow further customization of the environment (see
.IR rc (1)
for more information).
+The cpu server can be specified with
+.B -h
+.IR host ,
+otherwise it defaults to the environment variable
+.B $cpu
+or is looked up from
+.IR ndb (6).
.PP
.I Rimport
mounts a remote directory