Commit graph

580 commits

Author SHA1 Message Date
Jacob Moody
86e3e0791c inst: remove net install support 2024-04-28 00:20:45 +00:00
Jacob Moody
4745cae5bc g: search .S files
Useful for searching unix-y assembly files
2024-04-21 18:51:39 +00:00
Sigrid Solveig Haflínudóttir
6be977907b fshalt: halt ext4srv as well 2024-02-14 21:51:26 +00:00
sl
7f79ce9bb8 /rc/bin/9fs: case 9front: move extra to plan9.stanleylieber.com 2024-02-01 04:43:42 +00:00
Ori Bernstein
4dbb99f478 g: search in files with .txt suffix 2024-01-28 14:03:44 +00:00
Jacob Moody
917d0fa9b4 9fs: add iso case for nightly iso box 2024-01-27 22:05:23 +00:00
cinap_lenrek
7137060d85 ethermultilink: ignore link-status of primary
when link-status on secondary is lost, always switch
back to the primary regardless of if it has a link.

this works around some ethernet driver not setting
link-status consistently and wifi's that might
only indicate a link when connected to an ap.
2023-12-07 14:48:49 +00:00
cinap_lenrek
276c090a95 fshalt: get rid of special nvme hack for disk shutdown
The kernel has been fixed, no need to exclude
nvme drives anymore.
2023-11-18 21:59:38 +00:00
Ori Bernstein
b51b623725 ircrc: fix pong message (thanks mkf)
when connecting to ngircd, we can get disconnected
with a 'Spoofed prefix' message; this fixes the problem.
2023-11-05 20:46:40 +00:00
cinap_lenrek
54c94a93f0 listen(8): remove tcp53 reference, remove !tcp53 template 2023-10-29 13:56:47 +00:00
cinap_lenrek
4bc5793a2c cpurc, termrc, bootrc: organize default device binds
reorganise device binds for bootrc, cpurc and termrc.

make parallel port, audio, i2c and pci available in
cpurc/termrc console namespace.

remove redundant binds (which are handled by other
scripts).

detailed list:

¤ ¶:
cap and swap need to be bound only in bootrc.
for cpurc/termrc, it is bound from /lib/namespace.

P:
devarch, always good to have.

S f æ:
sd, floppy, aoe are always good to have in the console
namespace. regardless if its a cpu or terminal.
also bound in bootrc for obvious reasons.

note that #k is bound by diskparts script.

t:
uart; we always need it.

b m:
keyboard and mouse only needed in bootrc
for kbdfs and nusb/kb hid devices.

for cpurc/termrc, keyboard is provided by /srv/cons,
and mouse is bound by screenrc.

u:
usb stack, never needs to be bound manually as this
is handled by nusbrc.

v i:
vga and devdraw not needed to be bound here,
handled by screenrc.

L A J $:
parallel port, audio, i2c and pci are good to have in
cpurc/termrc console namespace for trouble shooting
and custom per site / machine rc scripts.
2023-10-14 17:12:05 +00:00
cinap_lenrek
7cd0b81c83 history: set missing execute bit 2023-10-02 20:15:59 +00:00
cinap_lenrek
556618eb07 sysupdate: use the rc -b flag to keep sysupdate in memory
when /rc/bin/sysupdate gets updated itself during a sysupdate,
rc gets confused when continuing reading the original file,
but it gets data from the updated file causing confusion.

the -b flag forces rc to read the original file as a whole
before starting execution preventing this issue.

updating this should be fine as the file has been shrunk
from 230 bytes to 224 bytes.
2023-09-17 00:36:51 +00:00
Jacob Moody
483ff27f9d games/voc^(enc dec): move from audio and add encoder 2023-08-23 15:57:00 +00:00
Ori Bernstein
13b1ea7493 lstk: add /bin/lstk to dump most recent crashed proc 2023-08-14 03:50:01 +00:00
qwx
37f710de39 add /rc/bin/doom: games/doom launcher
sets the namespace for a given engine version and iwad and any
pwads and lumps; manpage pending.
2023-08-13 19:53:47 +00:00
qwx
e5c7fe6305 games/doom: use wadfs to expose genmidi lump instead of extracting to /tmp
to allow using games/dmid + games/opl3 for music playback, the genmidi
lump must be exposed;  previous attempt was insufficient since patch wads
can overwrite iwad contents, which a single wadfs cannot take into account
(commit e7b1c1aad8).
subsequent fix was to use the normal mechanisms to extract the lump to /tmp
and later the music lumps for playback, but the temp file may not always
be properly cleaned up, preventing any music playback due to conflicts.
so, spawn one wadfs for the iwad and one for each subsequently added pwad,
just making sure that they have sufficient delay to properly initialize
and bind in the right order
2023-08-09 23:01:21 +00:00
cinap_lenrek
2153eb179c ethermultilink: send gratious arp instead of flushing arp cache 2023-07-23 22:22:48 +00:00
cinap_lenrek
216ecc5460 ethermultilink: add "bypass" ctl for ethernet
Instead of having a ethersink with the same mac, implement
a "bypass" mechanism that lets us get access to the interfaces
frames and bypass the physical link.

Now no extra ethersink is required and a pre-existing
interface can be bridged transparently.
2023-07-22 17:23:06 +00:00
cinap_lenrek
c690c0b9f3 ethermultilink: switch between different physical interfaces based on link status
This adds the capability of specifying multiple
interfaces on bootargs like:

bootargs=tls!ether /net/ether1 ether /net/ether0 ...

which will be combined into a bridge and the new
ethermultilink script can dynamically add/remove
the interfaces based on link status.

a ethersink interface is used as the primary,
taking the mac address of the first secondary
interface.

this required some changes in how ethernets
and bridges interact, as bridge mode on a
ethernet interface would only forward
frames not desinted to the interfaces mac address.

we make promisc mode ethernet connections never
loop-back the frames written them
and we add a new "ethermac" type to devbridge
that uses promisc mode only without setting
bridge flag.

that way, we can attach a ethernet to a bridge
and get all its frames.

the result is that we can specify the wifi
interface as the first interface and ethernet
as the second interface and the system
will roam to ethernet transparently when the
ethernet cable is plugged in and switch back
to wifi when ethernet cable is disconnected.
2023-07-16 16:15:09 +00:00
cinap_lenrek
c9863f0ad3 termrc: start reform/pm and reform/audio drivers 2023-06-05 23:30:08 +00:00
cinap_lenrek
46bac13b16 netaudit: use new ndb/query flags instead of ndb/ipquery
Query ndb with ndb/query -x $net -cia.

This allows one to import a remote systems /net
and run a netaudit on it like:

rimport foobar /net /net.alt
netaudit /net.alt
2023-06-04 21:46:23 +00:00
mia soweli
2531938269 scram: → /rc/bin/scram
no need for scram to be a c program and duplicate the acpi shutdown code.
try writing power off to /dev/pmctl or fall back to the new -H flag
for aux/acpi.
2023-06-04 13:52:05 +00:00
cinap_lenrek
c6ca07ad4e sdnvme: add smart file for full smart info
Instead of cramming everything to the ctl file,
provide a separate file with the SMART/health information
using the format that matches the NVMe specification closely.

Also, the command to read the health information log page
can be namespace specific as indicated by bit 0 of LPA in
controller identification information.
2023-06-03 22:16:10 +00:00
Sigrid Solveig Haflínudóttir
f0084afefa fshalt: until sd* drivers get fixed (in a calm manner) only unconfigure nvme drives 2023-05-26 21:33:17 +00:00
Sigrid Solveig Haflínudóttir
390c71f0c7 sdnvme, fshalt: turn disks off on fshalt
MNT Reform's power rails are switched off abruptly on shutdown
which causes an "unsafe" shutdown on nvme. This may result in
loss of valid data in the volatile write cache, which is never
going to be synced in this case. This problem has been reported
on forums about Linux too, including actual filesystem errors
resulting from that behavior.

Notify nvme about a shutdown and wait up to 3s before disabling
the controller. This resulted in "unsafe shutdowns" nvme's counter
to never increase on fshalt.
2023-05-24 16:14:33 +00:00
Michael Forney
906ee79533 fstype: add support for gefs 2023-05-02 21:08:51 +00:00
Jacob Moody
89cb83a426 audio/vocdec: Creative Voice File decoder
slight correction in file.c from previous commit
2023-02-09 02:41:21 +00:00
cinap_lenrek
b883050361 sysinfo: use usbtree instead of just cating #u/usb/ctl 2023-01-29 20:35:10 +00:00
cinap_lenrek
6cbcac7382 usbtree: a little helper to pretty print usb hubs and devices in a tree 2023-01-05 19:27:13 +00:00
cinap_lenrek
827fdabbf9 netaudit: fix format, always state the fileserver tested 2022-12-14 18:20:48 +00:00
cinap_lenrek
16ba4693e5 netaudit: check none attach too 2022-12-14 18:06:17 +00:00
cinap_lenrek
ac0c7a5c96 netaudit: fix it for multiple results 2022-12-14 17:57:12 +00:00
Jacob Moody
f8509c37cb netaudit: perform a clean connection to test auth status
if we did connect with authentication to cwfs to set up
/srv/boot, then this would spout lies.
2022-12-14 17:42:39 +00:00
Jacob Moody
65d044deae netaudit: uncomment out warning about /srv/boot
In light of recent cwfs state, this is more useful.
2022-12-14 17:09:32 +00:00
cinap_lenrek
a7b30a349b rc: use /fd/0 for standard-input instead of '#d/0' in non-interactive mode 2022-12-12 21:21:22 +00:00
cinap_lenrek
7054405409 rc: read standard-input from /fd/0 instead of '#d/0' 2022-12-12 20:54:53 +00:00
qwx
618b7b861b play: use doom1.wad and dmid/opl3 for midi files by default 2022-11-28 00:26:07 +00:00
cinap_lenrek
4939948263 play: aac support 2022-11-27 23:07:26 +00:00
Ori Bernstein
2380532ff5 sysupdate: only pull on 'front' branch
prevent accidental merges and clobbers of work in progress
2022-11-24 03:11:14 +00:00
qwx
e2566e93e8 history: fix walking and handling files with spaces 2022-11-15 21:58:00 +00:00
Michael Forney
b7cc14789a ircrc: fix race with pipe causing hangup
If the work function opens and closes $netdir/data for an echo
redirection *before* the asynchronous cat process opens it,
aux/trampoline (or tlsclient) will receive a hangup, terminating the
connection.

To fix this, redirect work's stdout to $netdir/data so that it remains
open, and adjust the echo commands accordingly.
2022-11-05 02:57:49 +00:00
cinap_lenrek
0e66f87316 florenate: not funny 2022-10-31 15:53:53 +00:00
Jacob Moody
58339beadd window: fix regression w.r.t subrios
When running a plumber and rio combo within a window we were wrongly
using the 'root' rios /dev/wctl.  This change happened when we removed
$wctl and had subtly changed the priority of ways /bin/window used to
talk to rio.  This mimics the old behavior.
2022-10-18 00:07:30 +00:00
Ori Bernstein
d848292549 valley, feminize: these jokes suck. 2022-10-14 02:58:06 +00:00
Jacob Moody
ed06d70343 window: add wsys 'none' attach to attempted wctl search
While window did work when run under riostart without $wctl,
the change window running from the plumber. It is typical
for lib/profile to contain:

plumber
rio -s riostart

Previously this worked because rio polluted the envgroup
with $wctl and $wsys, but without $wctl or /dev/wctl the
plumber's window fails to find rio. In favor of not breaking
this configuration we allow window to fallback to checking $wsys
and attaching to the none window. This should keep window working
in all cases in which the wctl pollution worked before.
2022-09-11 03:47:48 +00:00
Sigrid Solveig Haflínudóttir
25ad7eef2c fshalt: optionally use /dev/pmctl to shut down the machine 2022-09-07 19:49:38 +00:00
Sigrid Solveig Haflínudóttir
f05b00e7be fshalt: shut up about #P not being present 2022-08-20 16:40:11 +00:00
Sigrid Solveig Haflínudóttir
a078bdb66a fshalt: support relative paths to the new kernel 2022-08-20 16:38:45 +00:00
Ori Bernstein
0986cc7a92 fshalt: remove unused variable 2022-08-20 12:39:23 +00:00