profile: don't create $wsys if it doesn't exist
When $wsys doesn't exist (eg, drawterm -G, or rcpu from a text console), the profile would create an empty $wsys variable, and sessions started in this environment would fail with a null list in concatenation. This change tests if /mnt/term/env/wsys exists before assigning it.
This commit is contained in:
parent
f4d2067373
commit
33fb16c9fe
1 changed files with 2 additions and 2 deletions
4
sys/lib/dist/usr/glenda/lib/profile
vendored
4
sys/lib/dist/usr/glenda/lib/profile
vendored
|
@ -19,8 +19,8 @@ case cpu
|
||||||
bind -q /mnt/term/dev/consctl /dev/consctl
|
bind -q /mnt/term/dev/consctl /dev/consctl
|
||||||
>[2] /dev/null {
|
>[2] /dev/null {
|
||||||
cp /dev/sysname /mnt/term/dev/label
|
cp /dev/sysname /mnt/term/dev/label
|
||||||
if(wsys=`{cat /mnt/term/env/wsys})
|
if(test -s /mnt/term/env/wsys)
|
||||||
wsys=/mnt/term^$wsys
|
wsys=/mnt/term^`{cat /mnt/term/env/wsys}
|
||||||
}
|
}
|
||||||
bind -a /mnt/term/dev /dev
|
bind -a /mnt/term/dev /dev
|
||||||
prompt=('cpu% ' ' ')
|
prompt=('cpu% ' ' ')
|
||||||
|
|
Loading…
Reference in a new issue