boorc, nusbrc: fix wrong redirections after &

the rc & operator changes stdin to /dev/null, so we
have to do the <[0=1] inside the {}

this never showed up as an issue because many
fileservers just read 9p messages from standard
output.
This commit is contained in:
cinap_lenrek 2020-03-08 20:53:30 +01:00
parent f99b9cae6a
commit 28f3a3aad8
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ fn configlocal{
} }
fn bootfs{ fn bootfs{
{$1 -s -f $*(2-) &} <[0=1] | echo 0 >/srv/boot {$1 -s -f $*(2-) <[0=1] &} | echo 0 >/srv/boot
} }
fn connectlocal{ fn connectlocal{

View file

@ -45,7 +45,7 @@ if(! nusb/usbd)
diskparts $dev diskparts $dev
for(part in $dev/dos* $dev/9fat* $dev/data) if(test -r $part && ~ `{fstype $part} dos) { for(part in $dev/dos* $dev/9fat* $dev/data) if(test -r $part && ~ `{fstype $part} dos) {
mkdir -m 0700 '#σc/'^$dev || exit mkdir -m 0700 '#σc/'^$dev || exit
{dossrv -s -f $part &} <[0=1] | {dossrv -s -f $part <[0=1] &} |
echo 0 >'#σc/'^$dev/dos echo 0 >'#σc/'^$dev/dos
exit exit
} }