* bug with drawterm -G then rcpu
@ 2020-10-28 2:34 Eli Cohen
2020-11-01 19:58 ` [9front] " ori
0 siblings, 1 reply; 2+ messages in thread
From: Eli Cohen @ 2020-10-28 2:34 UTC (permalink / raw)
To: 9front
I found that when I drawterm -G then rcpu from inside it, the default
lib/profile fails with "null list in concatenation." this seems to fix
it but I'm not sure it's the best way:
--- /sys/lib/dist/usr/glenda/lib/profile Fri Oct 4 17:33:29 2019
+++ lib/profile Tue Oct 27 19:20:06 2020
@@ -19,7 +19,7 @@
bind -q /mnt/term/dev/consctl /dev/consctl
>[2] /dev/null {
cp /dev/sysname /mnt/term/dev/label
- if(wsys=`{cat /mnt/term/env/wsys})
+ if(wsys=`{cat /mnt/term/env/wsys} && ! ~ $#wsys 0)
wsys=/mnt/term^$wsys
}
bind -a /mnt/term/dev /dev
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9front] bug with drawterm -G then rcpu
2020-10-28 2:34 bug with drawterm -G then rcpu Eli Cohen
@ 2020-11-01 19:58 ` ori
0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2020-11-01 19:58 UTC (permalink / raw)
To: echoline, 9front
> I found that when I drawterm -G then rcpu from inside it, the default
> lib/profile fails with "null list in concatenation." this seems to fix
> it but I'm not sure it's the best way:
>
> --- /sys/lib/dist/usr/glenda/lib/profile Fri Oct 4 17:33:29 2019
> +++ lib/profile Tue Oct 27 19:20:06 2020
> @@ -19,7 +19,7 @@
> bind -q /mnt/term/dev/consctl /dev/consctl
> >[2] /dev/null {
> cp /dev/sysname /mnt/term/dev/label
> - if(wsys=`{cat /mnt/term/env/wsys})
> + if(wsys=`{cat /mnt/term/env/wsys} && ! ~ $#wsys 0)
> wsys=/mnt/term^$wsys
> }
> bind -a /mnt/term/dev /dev
This is a hack. The issue is that
wsys=`{...}
creates an empty variable if the command fails. How does this look?
--- a/sys/lib/dist/usr/glenda/lib/profile Sun Nov 01 11:56:26 2020 -0800
+++ b/sys/lib/dist/usr/glenda/lib/profile Sun Nov 01 11:58:15 2020 -0800
@@ -19,8 +19,8 @@
bind -q /mnt/term/dev/consctl /dev/consctl
>[2] /dev/null {
cp /dev/sysname /mnt/term/dev/label
- if(wsys=`{cat /mnt/term/env/wsys})
- wsys=/mnt/term^$wsys
+ if(test -f /mnt/term/env/wsys)
+ wsys=/mnt/term^`{cat /mnt/term/env/wsys}
}
bind -a /mnt/term/dev /dev
prompt=('cpu% ' ' ')
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-01 19:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 2:34 bug with drawterm -G then rcpu Eli Cohen
2020-11-01 19:58 ` [9front] " ori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).