<div dir="ltr">On 18 September 2017 at 19:41, Andre McCurdy <span dir="ltr"><<a href="mailto:armccurdy@gmail.com" target="_blank">armccurdy@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Sep 18, 2017 at 8:17 AM, Burton, Ross <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>> wrote:<br>
> On 18 September 2017 at 16:07, Peter Kjellerstedt<br>
> <<a href="mailto:peter.kjellerstedt@axis.com">peter.kjellerstedt@axis.com</a>> wrote:<br>
>><br>
>> > -----Original Message-----<br>
>> > From: <a href="mailto:openembedded-core-bounces@lists.openembedded.org">openembedded-core-bounces@<wbr>lists.openembedded.org</a><br>
>> > [mailto:<a href="mailto:openembedded-core-bounces@lists.openembedded.org">openembedded-core-<wbr>bounces@lists.openembedded.org</a><wbr>] On Behalf Of<br>
>> > Mike Looijmans<br>
>> > Sent: den 18 september 2017 16:07<br>
>> > To: <a href="mailto:openembedded-core@lists.openembedded.org">openembedded-core@lists.<wbr>openembedded.org</a><br>
>> > Cc: Mike Looijmans <<a href="mailto:mike.looijmans@topic.nl">mike.looijmans@topic.nl</a>>; Peter Kjellerstedt<br>
>> > <<a href="mailto:peter.kjellerstedt@axis.com">peter.kjellerstedt@axis.com</a>><br>
>> > Subject: [OE-core] [PATCH] base-files: profile: Get rid of "resize"<br>
>> ><br>
>> > The "resize" command actually outputs shell commands to be executed, for<br>
>> > example:<br>
>> ><br>
>> > $ resize<br>
>> > COLUMNS=102;<br>
>> > LINES=27;<br>
>> > export COLUMNS LINES;<br>
>> ><br>
>> > The output of "resize" is being discarded to /dev/null so the call has<br>
>> > no<br>
>> > effect whatsoever, and does not change the environment (it cannot change<br>
>> > the<br>
>> > environment of its parent). Remove the call and hence solve the messages<br>
>> > about shells missing "command" or "tty" or "resize".<br>
>> ><br>
>> > Signed-off-by: Mike Looijmans <<a href="mailto:mike.looijmans@topic.nl">mike.looijmans@topic.nl</a>><br>
>> > ---<br>
>> > meta/recipes-core/base-files/<wbr>base-files/profile | 9 ---------<br>
>> > 1 file changed, 9 deletions(-)<br>
>> ><br>
>> > diff --git a/meta/recipes-core/base-<wbr>files/base-files/profile<br>
>> > b/meta/recipes-core/base-<wbr>files/base-files/profile<br>
>> > index a062028..cfd0d69 100644<br>
>> > --- a/meta/recipes-core/base-<wbr>files/base-files/profile<br>
>> > +++ b/meta/recipes-core/base-<wbr>files/base-files/profile<br>
>> > @@ -20,15 +20,6 @@ if [ -d /etc/profile.d ]; then<br>
>> > unset i<br>
>> > fi<br>
>> ><br>
>> > -if command -v resize >/dev/null && command -v tty >/dev/null; then<br>
>> > - # Make sure we are on a serial console (i.e. the device used<br>
>> > starts with<br>
>> > - # /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher<br>
>> > which<br>
>> > - # tries do use ssh<br>
>> > - case $(tty) in<br>
>> > - /dev/tty[A-z]*) resize >/dev/null;;<br>
>> > - esac<br>
>> > -fi<br>
>> > -<br>
>> > export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM<br>
>> ><br>
>> > umask 022<br>
>> > --<br>
>> > 1.9.1<br>
>><br>
>> Hold on. Looking at busybox' source code for resize, it seems that<br>
>> it actually does something besides outputting the shell code to<br>
>> set the variables (which is actually enabled by a separate feature<br>
>> called ENABLE_FEATURE_RESIZE_PRINT). It also calls<br>
>> ioctl(STDERR_FILENO, TIOCSWINSZ, &w) where w contains the<br>
>> calculated sizes.<br>
><br>
> My knowledge of ANSI escapes is incredibly sketchy, but isn't that the code<br>
> to *get* the size of the screen? Put the cursor at 999,999, then ask where<br>
> it is?<br>
<br>
</div></div>The behaviour may have got broken with the various /etc/profile<br>
rewrites but it certainly did do something useful originally - it<br>
greatly improves usability for shells run on serial consoles. Please<br>
don't just remove it.<br></blockquote><div><br></div><div>The question is does it do something useful *now*?</div><div><br></div><div>Ross </div></div></div></div>