diff options
author | Ori Bernstein <ori@eigenstate.org> | 2020-11-02 08:29:05 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2020-11-02 08:29:05 -0800 |
commit | 33fb16c9fe7744aae8736bb4b48ba4e0f505eafc (patch) | |
tree | 56dd2e6224f0ed16674cd128a521aa515896f9a2 /sys/lib/dist | |
parent | f4d206737342feec31086a8f3ca6866506a2e0b5 (diff) |
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.
Diffstat (limited to 'sys/lib/dist')
-rw-r--r-- | sys/lib/dist/usr/glenda/lib/profile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/lib/dist/usr/glenda/lib/profile b/sys/lib/dist/usr/glenda/lib/profile index d65c12d23..5637a9efe 100644 --- a/sys/lib/dist/usr/glenda/lib/profile +++ b/sys/lib/dist/usr/glenda/lib/profile @@ -19,8 +19,8 @@ case cpu 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 -s /mnt/term/env/wsys) + wsys=/mnt/term^`{cat /mnt/term/env/wsys} } bind -a /mnt/term/dev /dev prompt=('cpu% ' ' ') |