<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 07/02/2021 04:19 PM, Oleksiy Tkachenko wrote:<br>
    <blockquote cite="mid:CALcs8RCzqs9Lb7CCEeWmti-reFZ2dyWjERP7Jc_+cbU3arYwuA@mail.gmail.com" type="cite">
      
      <div dir="ltr">
        <div dir="ltr">I use openVZ since 2011 and bash_profile was
          always executed on all machines I have access to.<br>
          It's even stored in my new server installation instructions)<br>
        </div>
      </div>
    </blockquote>
    <br>
    .bash_profile is not intended to be executed on &quot;vzctl enter CT&quot;.<br>
    Never was.<br>
    <br>
    Please give an example when it's executed.<br>
    <br>
    --<br>
    Konstantin<br>
    <br>
    <blockquote cite="mid:CALcs8RCzqs9Lb7CCEeWmti-reFZ2dyWjERP7Jc_+cbU3arYwuA@mail.gmail.com" type="cite">
      <div dir="ltr">
        <div dir="ltr">
          <div><br>
          </div>
          <div>Now I'm confused - how to run set of commands when &quot;vzctl
            enter CID&quot; from HN?<br>
          </div>
        </div>
        <div>&quot;su - &quot; is not really a good option since it runs another
          instance of bash.</div>
        <div><br>
        </div>
        <br class="gmail-Apple-interchange-newline">
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">чт, 1 лип. 2021 о 20:38 jjs
            - mainphrame &lt;<a moz-do-not-send="true" href="mailto:jjs@mainphrame.com">jjs@mainphrame.com</a>&gt;
            пише:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">That's odd. I've been using openvz since
              well, a long time. And as far as I can remember, doing
              &quot;vzctl enter&quot; has never sourced the login profile, since
              entering the CTin that fashion makes you basically sort of
              an unknown uid 0 entity.<br>
              <br>
              Jake<br>
              <br>
              <br>
              <br>
              &nbsp;</div>
            <br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Thu, Jul 1, 2021 at
                10:21 AM Oleksiy Tkachenko &lt;<a moz-do-not-send="true" href="mailto:mealexat@gmail.com" target="_blank">mealexat@gmail.com</a>&gt;
                wrote:<br>
              </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">
                  <div dir="ltr">but my bash_profile's&nbsp;were always
                    executed before I run latest&nbsp;openVZ7 updates.<br>
                    that's the point)</div>
                  <div>is that bug?</div>
                  <div dir="ltr"><br>
                  </div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">чт, 1 лип. 2021 о
                      20:05 jjs - mainphrame &lt;<a moz-do-not-send="true" href="mailto:jjs@mainphrame.com" target="_blank">jjs@mainphrame.com</a>&gt;
                      пише:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0px
                      0px 0px 0.8ex;border-left:1px solid
                      rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">It would run during an actual
                        login. But entering the CT via vzctl&nbsp;enter
                        bypasses the normal login process.<br>
                        <br>
                        Jake</div>
                      <br>
                      <div class="gmail_quote">
                        <div dir="ltr" class="gmail_attr">On Thu, Jul 1,
                          2021 at 9:55 AM Oleksiy Tkachenko &lt;<a moz-do-not-send="true" href="mailto:mealexat@gmail.com" target="_blank">mealexat@gmail.com</a>&gt;
                          wrote:<br>
                        </div>
                        <blockquote class="gmail_quote" style="margin:0px 0px 0px
                          0.8ex;border-left:1px solid
                          rgb(204,204,204);padding-left:1ex">
                          <div dir="ltr">That's works fine.
                            <div>But how to run that
                              automatically&nbsp;during login?</div>
                          </div>
                          <br>
                          <div class="gmail_quote">
                            <div dir="ltr" class="gmail_attr">чт, 1 лип.
                              2021 о 18:19 jjs - mainphrame &lt;<a moz-do-not-send="true" href="mailto:jjs@mainphrame.com" target="_blank">jjs@mainphrame.com</a>&gt;
                              пише:<br>
                            </div>
                            <blockquote class="gmail_quote" style="margin:0px 0px 0px
                              0.8ex;border-left:1px solid
                              rgb(204,204,204);padding-left:1ex">
                              <div dir="ltr">
                                <div>This works for me:</div>
                                <div><br>
                                </div>
                                su -&nbsp;
                                <div><br>
                                </div>
                                <div>Jake</div>
                              </div>
                              <br>
                              <div class="gmail_quote">
                                <div dir="ltr" class="gmail_attr">On
                                  Thu, Jul 1, 2021 at 8:03 AM Oleksiy
                                  Tkachenko &lt;<a moz-do-not-send="true" href="mailto:mealexat@gmail.com" target="_blank">mealexat@gmail.com</a>&gt;
                                  wrote:<br>
                                </div>
                                <blockquote class="gmail_quote" style="margin:0px 0px 0px
                                  0.8ex;border-left:1px solid
                                  rgb(204,204,204);padding-left:1ex">
                                  <div dir="ltr">
                                    <div style="font-family:-moz-fixed;font-size:12px" lang="x-unicode">I realize that
                                      bash_profile not executed
                                      automatically when &quot;vzctl enter
                                      CID&quot; now.
                                      <br>
                                      <br>
                                      How to execute it ?
                                      <br>
                                      Thank you!
                                      <br>
                                      <br>
                                      <br>
                                      --
                                      <br>
                                      Olexiy&nbsp;<br>
                                    </div>
                                  </div>
                                  <br>
                                </blockquote>
                              </div>
                            </blockquote>
                          </div>
                        </blockquote>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
            </div>
          </blockquote>
        </div>
      </div>
      <br>
    </blockquote>
  </body>
</html>