<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 11/29/2016 12:52 PM, Leonardo
      Sandoval wrote:<br>
    </div>
    <blockquote
      cite="mid:2a1fd093-8b07-1e04-4167-f52c0698446e@linux.intel.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <p><br>
      </p>
      <br>
      <div class="moz-cite-prefix">On 11/29/2016 02:15 PM, Christopher
        Larson wrote:<br>
      </div>
      <blockquote
cite="mid:CABcZANnQ87Q=h4-ponSyGP_-Q8bsRPfMOQ+UZWf0S7i85D2-GQ@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Tue, Nov 29, 2016 at 11:29 AM, <span
                dir="ltr">&lt;<a moz-do-not-send="true"
                  href="mailto:leonardo.sandoval.gonzalez@linux.intel.com"
                  target="_blank">leonardo.sandoval.gonzalez@linux.intel.com</a>&gt;</span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div id=":2m0" class="a3s aXjCH m158b154f368e9e70">From:
                  Leonardo Sandoval &lt;<a moz-do-not-send="true"
                    href="mailto:leonardo.sandoval.gonzalez@linux.intel.com">leonardo.sandoval.gonzalez@<wbr>linux.intel.com</a>&gt;<br>
                  <br>
                  getty devices were not being removed in some cases
                  because device name<br>
                  was not at the end of the line, for example a ttyS1
                  device:<br>
                  <br>
                  S1:12345:respawn:/bin/start_<wbr>getty 115200 ttyS1
                  vt102<br>
                  <br>
                  Removing this limitation allows sed to remove any line
                  containing<br>
                  the device.<br>
                  <br>
                  Signed-off-by: Leonardo Sandoval &lt;<a
                    moz-do-not-send="true"
                    href="mailto:leonardo.sandoval.gonzalez@linux.intel.com">leonardo.sandoval.gonzalez@<wbr>linux.intel.com</a>&gt;<br>
                  ---<br>
                   meta/recipes-core/sysvinit/<a moz-do-not-send="true"
                    href="http://sysvinit-inittab_2.88dsf.bb"
                    rel="noreferrer" target="_blank">sys<wbr>vinit-inittab_2.88dsf.bb</a>
                  | 2 +-<br>
                   1 file changed, 1 insertion(+), 1 deletion(-)<br>
                  <br>
                  diff --git a/meta/recipes-core/sysvinit/<a
                    moz-do-not-send="true"
                    href="http://sysvinit-inittab_2.88dsf.bb"
                    rel="noreferrer" target="_blank">s<wbr>ysvinit-inittab_2.88dsf.bb</a>
                  b/meta/recipes-core/sysvinit/<a moz-do-not-send="true"
                    href="http://sysvinit-inittab_2.88dsf.bb"
                    rel="noreferrer" target="_blank">s<wbr>ysvinit-inittab_2.88dsf.bb</a><br>
                  index c219cbf..dd30f43 100644<br>
                  --- a/meta/recipes-core/sysvinit/<a
                    moz-do-not-send="true"
                    href="http://sysvinit-inittab_2.88dsf.bb"
                    rel="noreferrer" target="_blank">s<wbr>ysvinit-inittab_2.88dsf.bb</a><br>
                  +++ b/meta/recipes-core/sysvinit/<a
                    moz-do-not-send="true"
                    href="http://sysvinit-inittab_2.88dsf.bb"
                    rel="noreferrer" target="_blank">s<wbr>ysvinit-inittab_2.88dsf.bb</a><br>
                  @@ -62,7 +62,7 @@ if [ "x$D" = "x" ] &amp;&amp; [ -e
                  /proc/consoles ]; then<br>
                                  k=`echo ${i} | sed s/^.*\://g`<br>
                                  if [ -z "`grep ${j} /proc/consoles`"
                  ]; then<br>
                                          if [ -z "${k}" ] || [ -z
                  "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ];
                  then<br>
                  -                               sed -i /^.*${j}$/d
                  /etc/inittab<br>
                  +                               sed -i /^.*${j}/d
                  /etc/inittab</div>
              </blockquote>
            </div>
            <br>
            This doesn’t check for the end of a word, so it’d match a
            partial as well. Would that be a problem? i.e. ttyS1 vs
            ttyS10.<br>
          </div>
        </div>
      </blockquote>
      <br>
      That is the intention, that line removal is not tied to finding
      the device at the end of the line. With proposed patch, it removes
      the device, no matter where is located.<br>
      <br>
    </blockquote>
    Right, but look at this hypothetical example:<br>
    <br>
    S1:12345:respawn:/bin/start_getty 115200 ttyS1 vt102<br>
    S10:12345:respawn:/bin/start_getty 115200 ttyS10<br>
    <br>
    Both would match, when you only want the top to match. This is
    untested but likely more what we want:<br>
    <br>
    sed -i /^.*${j}[\ $]/d /etc/inittab<br>
    <br>
    That way we either match up to a space (end of word) or end of line.<br>
    <br>
    ---<br>
    Cal<br>
    <br>
    <blockquote
      cite="mid:2a1fd093-8b07-1e04-4167-f52c0698446e@linux.intel.com"
      type="cite"> <br>
      <blockquote
cite="mid:CABcZANnQ87Q=h4-ponSyGP_-Q8bsRPfMOQ+UZWf0S7i85D2-GQ@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div class="gmail_extra">-- <br>
            <div class="gmail_signature"
              data-smartmail="gmail_signature">Christopher Larson<br>
              clarson at kergoth dot com<br>
              Founder - BitBake, OpenEmbedded, OpenZaurus<br>
              Maintainer - Tslib<br>
              Senior Software Engineer, Mentor Graphics</div>
          </div>
        </div>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>