Commit graph

508 commits

Author SHA1 Message Date
Sigrid
d0cc9e2eb6 g: initialize files env var 2020-12-19 13:33:11 +01:00
Ori Bernstein
c2aa8c997a hpost: support custom headers (thanks julienxx)
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.
2020-12-17 20:26:38 -08:00
cinap_lenrek
27a83106f4 oexportfs: move legacy code for cpu and import to separate program
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.
2020-12-13 20:09:03 +01:00
Sigrid
d7120ecb77 src: work on awk scripts too, see "src valley" (thanks phil9) 2020-12-10 10:33:42 +01:00
Ori Bernstein
e60216c2b7 g: fix typo in last commit 2020-11-22 17:42:25 -08:00
Ori Bernstein
97008caa41 g: filter directory arguments
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}
2020-11-21 21:23:46 -08:00
kvik
58861fff63 window: fix error exit with the -m flag
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.
2020-09-16 13:12:13 +02:00
Alex Musolino
cf69bb920a rc-httpd: fix invalid test(1) invocation in dir-index 2020-08-02 18:30:01 +09:30
Ori Bernstein
03499e53cc g: add '.hs' and 'mkfile' to the walk. (thanks joe9)
This expands the set of files that we grep through by default to
include mkfiles and haskell.
2020-07-14 20:46:00 -07:00
Ori Bernstein
7364a96b28 bell labs is dead, man
remove the last reference from 9fs.
2020-03-20 14:12:23 -07:00
Ori Bernstein
5bc9b0c3ca improve usage messages (thanks henesy)
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.
2020-03-10 10:09:34 -07:00
Ori Bernstein
06ea44c895 fix -T option for doctype
We used to set $dev to -T, and leave the device type
in the argument list. Now, we set it to -T$2, and shift
it out of the list.
2020-03-10 09:35:06 -07:00
Ori Bernstein
e652be5559 "": output previous action to stderr
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.
2020-03-08 11:46:34 -07:00
Ori Bernstein
0f9666ae16 walk arguments to g
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.
2020-02-26 21:45:00 -08:00
Alex Musolino
c43700f569 rc-httpd: append carriage return to content-length header 2020-01-07 17:28:59 +10:30
cinap_lenrek
57dbe35fb6 console(8): add console command and manpage
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.
2019-12-09 17:44:28 +01:00
Alex Musolino
4ff5a4febb rc-httpd: serve markdown with text/plain content-type 2019-06-20 16:26:03 +09:30
Alex Musolino
3a3eb0434c rc-httpd: set charset=utf-8 for all text/* content types 2019-06-17 13:17:16 +09:30
Alex Musolino
8648e06534 rc-httpd: only emit charset option for text/plain content type 2019-06-17 13:13:40 +09:30
Alex Musolino
78c7cd0c01 rc-httpd(8): avoid duplicate log output in dir-index handler
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.
2019-06-05 16:04:50 +09:30
Ori Bernstein
341b64b5bd Remove trailing whitespace. 2019-06-04 22:47:07 -07:00
Ori Bernstein
41be41b493 Lost a trailing \n 2019-06-04 22:42:10 -07:00
Ori Bernstein
033c2812c2 Make 'g' grep recursively by default. 2019-06-04 22:36:32 -07:00
BurnZeZ
ec8ad3ab84 uptime: rewrite in awk 2019-04-07 17:09:52 +00:00
cinap_lenrek
f9efc8ed87 inst/startether: skip ipv6 auto configuration when nora6 was specified 2019-03-27 14:45:08 +01:00
cinap_lenrek
8d9f3906fa plan9.ini: add nora6= option to disable automatic ipv6 configuration 2019-03-27 14:11:25 +01:00
BurnZeZ
96b1debbf8 add entries for il rcpu 2018-12-07 01:41:27 +00:00
cinap_lenrek
22b28520cd fshalt: wait for fileservers command file to vanish
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.
2018-11-27 22:37:32 +01:00
cinap_lenrek
76812c9bb7 rcpu: fix pvar to initialize empty variables (thanks mycroftiv) 2018-11-13 11:03:37 +01:00
qwx
f5c6a870bf doom: fix music for patch wads
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.
2018-10-21 00:11:39 +02:00
cinap_lenrek
a13ba7741f hget: do a HEAD request to check if the file is already complete (thanks miscief)
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.
2018-10-10 02:45:11 +02:00
cinap_lenrek
567df638ac cpurc: filter ipv6 loopback address for automatic ip address setup (thanks fhs) 2018-10-03 00:53:10 +02:00
cinap_lenrek
4080322dc9 cpurc: handle multiple auth servers 2018-09-16 12:43:21 +02:00
cinap_lenrek
d52752fe68 netaudit: handle multiple ip addresses 2018-09-16 12:40:48 +02:00
cinap_lenrek
415ad3e723 inst/startether: fix typo 2018-08-15 22:14:52 +02:00
cinap_lenrek
cd752a39f8 ipv6 autoconfiguration on ethernet
for ip autoconfiguration, setup ipv6 link local addresses
and do SLAAC in parallel to DHCP.
2018-08-15 21:39:30 +02:00
mischief
a8d747d994 valley: call srand so that actual random phrases are used 2018-08-10 07:46:13 -07:00
spew
d534727413 win: bind the text file properly instead of a special case in " 2018-08-02 14:21:19 -04:00
cinap_lenrek
74f6b4e502 screenrc: bind '#v' when not already done (for cpu servers) 2018-07-14 17:19:41 +02:00
qwx
96e511d736 add games/dmid and games/opl3 2018-07-12 09:33:33 +02:00
Alex Musolino
1de2698dc8 play(1): handle file names containing consecutive spaces 2018-06-18 13:11:03 +09:30
aiju
2b5dfee06c Bfn improvements 2018-05-26 17:17:41 +00:00
cinap_lenrek
bf86c9b4e1 dontkill: explicitely set exit status to '' 2018-05-19 23:15:22 +02:00
cinap_lenrek
0c7a3ad1c9 remove ipv6on, update ipconfig(8) 2018-05-02 20:29:29 +02:00
cinap_lenrek
cedf916289 termrc: fix mistake 2018-05-02 00:03:24 +02:00
cinap_lenrek
3ffbe35a20 termrc: put #u in front for endpoint renaming to be effective, handle multipe ether= tuples in ndb 2018-05-01 23:46:57 +02:00
cinap_lenrek
4354c401c1 cpurc: remove obsolete device binds, run diskparts after $sysname is known. remove /env/boottime. document. 2018-04-12 21:30:28 +02:00
stanley lieber
013122b993 9fs: break 9front case into several cases: 9front, 9bugs, 9contrib, 9grep 2018-04-02 19:54:58 -04:00
glenda
59b31cccdb g: revert accidental change, document missing file type 2018-02-27 10:08:23 -05:00
glenda
60befe7df1 games/mix: fix incorrect line numbers 2018-02-26 22:39:49 -05:00
cinap_lenrek
d8999511e0 fstype: make copy of first sector in /env to avoid unaligned reads on the disk (for devfs)
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.
2018-02-07 18:18:32 +01:00
23hiro
17291d91bb rconnect: support -t timeout for aan like in drawterm; also rcpu, rexport/import 2018-01-07 02:44:53 +01:00
cinap_lenrek
c197fede61 inst: determine kernel for bootsetup from $bootfile and $cputype 2018-01-05 08:38:23 +01:00
cinap_lenrek
af06c6fa34 sysinfo: #c/swap -> #¶/swap 2018-01-05 02:43:28 +01:00
cinap_lenrek
89653dcc74 inst/mounthjfs: use /dev/swap instead of #c/swap to determine memory size (thanks aap) 2017-11-19 15:42:15 +01:00
aiju
99700fb024 check for fs= in netaudit 2017-10-04 15:56:53 +00:00
cinap_lenrek
be7f3fb5e4 rename pcf kernel to pc, remove pcf, pccpuf, pccpu64 kernels, update documentation
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.
2017-09-10 22:35:23 +02:00
cinap_lenrek
ef3af6eaa3 sysinfo: run aux/icanhasvmx with verbose flag 2017-08-08 19:02:42 +02:00
cinap_lenrek
541e211b7c sysinfo: only dump #r/nvram on amd64,386
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.
2017-08-08 10:16:13 +02:00
cinap_lenrek
7d1b9e39f7 inst: don't hardcode /net/ether0, might have usb ethernet 2017-08-05 14:30:48 +02:00
cinap_lenrek
caddc9a6ea inst: get rid of ppp configuration 2017-08-04 14:18:40 +02:00
cinap_lenrek
d5bbee50a0 inst: get rid of halt, just run fshalt in finish directly 2017-08-04 14:17:29 +02:00
cinap_lenrek
f777f7c421 inst: post newfs fileservers under /srv/$fstype.newfs to avoid conflict with preexisting local filesystem 2017-08-04 14:16:07 +02:00
BurnZeZ
eee7357c27 hpost: delimit @filenames by newline so files with whitespace aren’t mangled 2017-07-17 04:56:09 +00:00
BurnZeZ
37e0d4ab29 hpost: fix field content mangling when newlines are present 2017-07-17 04:34:14 +00:00
stanley lieber
84d8e75a58 newt: pipe output of h comnmand through $pager 2017-06-04 18:02:05 -04:00
cinap_lenrek
ea413b4a62 ircrc: strip backspaces, preventing backspace spam (thanks doppler) 2017-06-02 17:10:52 +02:00
stanley lieber
db46e826c2 newt: add !cmd 2017-05-28 15:45:07 -04:00
stanley lieber
9c70c81e70 newt: honor environment variables $editor and $pager 2017-05-26 11:15:35 -04:00
cinap_lenrek
20ba8815bc inst/configether: in manual network configuration, ask for dns server 2017-05-01 22:50:16 +02:00
aiju
759651e8a9 change cpurc to look for service folder in /cfg/$sysname and /cfg/default 2017-04-19 09:00:44 +00:00
aiju
9dee37a2b0 disable all services except 17019, 17020 by default 2017-04-19 08:51:18 +00:00
cinap_lenrek
4bcd247b90 change listener from ip/imap4d to upas/imap4d 2017-03-12 17:18:56 +01:00
cinap_lenrek
fb1299102f play: recognize .mus file extension 2017-02-26 22:17:18 +01:00
cinap_lenrek
70c6dab003 play, file: recognize midi and mus audio 2017-02-26 19:26:42 +01:00
aiju
e4dc3f9bd8 asaudit: check factotum key ; netaudit: mention asaudit 2017-02-25 11:54:15 +01:00
aiju
e5de0d457a add redact(1) 2017-02-25 00:56:26 +01:00
cinap_lenrek
cf7d50a1a1 inst/bootsetup: fix unformated esp check (thanks yellow_apple) 2017-01-23 14:37:02 +01:00
cinap_lenrek
ca47fef006 rcpu: use $cpu environment variable for host when not specified 2017-01-15 18:25:54 +01:00
cinap_lenrek
432c89418f remove !tcp22 service 2017-01-13 19:44:47 +01:00
khm
dc8c7bf2b7 ssh: R.I.P. 2017-01-12 16:36:38 -08:00
cinap_lenrek
cd15849bf2 rcpu: avoid filedescriptor conflict with <{} (thanks mycroftiv)
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.
2016-12-19 19:05:35 +01:00
cinap_lenrek
978628d679 tcp17019: make service proto and netdir arguments optional (for aux/listen1)
this allows /rc/bin/service/tcp17019 to be called from
aux/listen1 without arguments like:

aux/listen1 tcp!*!rcpu /rc/bin/service/tcp17019
2016-12-03 00:24:19 +01:00
BurnZeZ
b563ed7550 iwhois(1): make -n work, add .org, and a couple minor changes 2016-10-03 12:31:48 -04:00
cinap_lenrek
4052945479 ipv6on: get network device from $netdir/ipifc/*/status 2016-09-17 17:49:59 +02:00
aiju
762e98d47e Bfn: set +x 2016-08-26 21:23:13 +02:00
aiju
81b1fc5a12 fix Bfn botch 2016-08-25 23:03:54 +02:00
cinap_lenrek
5fc7cdbbcc 9fs: remove juke, kfs and snap targets, caching for other and dump 2016-07-02 21:15:39 +02:00
cinap_lenrek
bd50adc942 add srvtls and the corresponding tcp17020 service 2016-05-16 22:49:32 +02:00
stanley lieber
c7db24fc26 9fs: add sites to 9front case. 2016-05-04 19:26:26 -04:00
cinap_lenrek
2ef975ae7d hg: set $HOME when not already set to avoid silly uid lookups which can fail if theres no /adm/users 2016-05-04 19:23:57 +02:00
cinap_lenrek
651d6c2bc6 abaco(1): remove readweb 2016-04-26 00:10:47 +02:00
Matthew Veety
6d2635d5ba made abaco's gui respect $font and made readweb respect most installations 2016-04-25 17:49:31 -04:00
cinap_lenrek
2763229c00 rcpu: make sure not to leak /env/fn#server and /env/fn#aanserver for drawterm (thanks mischief) 2016-04-20 00:41:03 +02:00
cinap_lenrek
1e821d82f2 tcp567: run authserver with p9sk1 tickets disabled preventing offline password brute-force 2016-04-07 21:19:48 +02:00
stanley lieber
eed13a5c22 9fs: bind -b /n/9front.org!7734 /n/lists 2016-03-31 14:15:45 -04:00
cinap_lenrek
99e3bea407 g: dont pollute the environment (thanks BurnZeZ) 2016-03-13 22:34:08 +01:00
cinap_lenrek
e95f557ba5 rcpu: post hangup note to remote when connection breaks
when the cat that forwards notes on the remote exits,
send a hangup note so processes wont keep hanging arround.
2016-02-27 02:08:00 +01:00
cinap_lenrek
86dfd3cf16 provide rcpu(1), make usage line consistent 2016-02-15 17:30:56 +01:00
cinap_lenrek
fde5906b30 adding experimental rcpu service
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.
2016-02-14 05:18:33 +01:00