hget supports adding custom headers with -r;
it makes sense for hpost to do the same, both
because custom headers are more likely necessary
with POSTs, and for consistency.
The initial protocol handling in exportfs for
cpu and import services is a huge mess.
Saparate the code out into its own program with
its own oexportfs(4) manpage.
When searching directories recursively, it's still
desirable to filter the contents by the file pattern,
so that 'g foo /sys/src' doesn't end up searching for
foo within .$O files.
Files passed explicitly are still searched, so for the
old behavior, just use walk:
g foo `{walk -f $dir}
When called with the -m flag window would always exit with
some error, usually status='no match', because of an if-match
being the last status-setting command in the script.
Fix inconsistencies between programs and their usage
messages, correct instances where information seems
to be missing or lost. This includes missing arguments,
making usage consistent with manuals, and so on.
When redirecting output from "", it prints the command
to stdout, which garbles things like:
% foo
<inspect output>
% "" > /dev/snarf
Now, we send it to stderr.
This allows us to 'g' the files
within a directory, as in:
g _MAX /sys/include/ape
Before this change, we'd attempt to
grep the directory structure, which
is not ideal. After, we grep the
files within the directory.
the console command runs a command or the system shell under
a new instance of kbdfs, optionally providing a serial console
when $console environment variable is set.
Delay calling do_log until just before emitting the response. This avoids
calling do_log before potentially handing control to the static-index
handler, which also calls do_log.
cwfs and hjfs create ther /srv command files with
ORCLOSE flag, so they get removed once the fileserver
terminates. we can use this to check that the fileserver
has in fact finished halting without making assumtions
about the time it should maximally take for any fileserver
to write out its buffers to disk.
revert last change, which used games/wadfs to expose genmidi and music lumps.
replacements from patch wads were never seen that way. instead, write genmidi
and music lumps to /tmp and play them from there.
when we continue a download, make sure the file isnt already
complete, as otherwise the server might respond with a 416
as the range request will out of range.
devfs crypto partitions do not support unaligned reads,
so we make a copy of the first in /env/block and then
slice it to find filesystem signatures.
thanks mykhal for reporting the issue.
there isnt much of a point in keep maintaining separate
kernel configurations for terminal and cpu kernels as
the role can be switched with service=cpu boot parameter.
to make stuff cosistent, we will just have one "pc" kernel
and one "pc64" kernel configuration now.
right now, theres no kernel that stores hostowner keys
in #r/nvram, but this could change in the future. so
only dump #r/nvram on the pc where we know that its
not used to hold keys.
the rcpu client dup's fd 0,1,2 to fd 10,11,12 which
can accidentally override the pipe file descriptor
allocated by the <{} operator. to avoid this problem,
we generate the remote script as an /env file in a
separate step now.
this is a reimplementation of cpu and import utilities in rc using a tlsclient
and tlssrv as the encryption and authentication layers. there is only one new
service, which after authentication and encryption setup accepts an arbitrary
rc script over the network and executes it with the standard filedescriptors
redirected to the conversaion (this is *after* authentication and in the
context of the authorized user).
the new rcpu program has a few improvements over cpu(1):
- doesnt mangle program arguments
- the remote process will get the clients standard file descriptors, so error
and output are separated and you can consume the clients input from the
remote side :-)
- forwards error status of remote process
theres no backwards mode for rimport, but a new program called rexport
for the same purpose.
all these services use exportfs without the bolted on initial handshake,
so the hope is to clean up exportfs in the future and remove all the ugly
crap in there.