RHEL Anaconda kickstart installer error message on terminal console with log and exit immediately

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












My kickstart script is like this:



%pre --log=/tmp/log
wget --no-check-certificate http://192.168.2.33/file
[ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
....
%end


wget command fails as the file is not available in the server. Now, I want the script to be stopped executing the installation any further and fails immediately when it sees any error with the corresponding error message showing up on the terminal screen



I stumbled upon this option --erroronfail but it only shows the Python exception traceback calls in the console without the actual error string to show to the user why it is failed.



I have tried the following ways:



%pre --interpreter /bin/sh --log=/tmp/log --erroronfail
exec < /dev/tty3 > /dev/tty3
chvt 3
wget --no-check-certificate http://192.168.2.33/file
[ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
chvt 1
%end


and as below too



%pre --interpreter /bin/sh --log=/tmp/log --erroronfail
exec < /dev/tty3 > /dev/tty3
chvt 3
wget --no-check-certificate http://192.168.2.33/file 2>&1 | /usr/bin/tee -a /tmp/log
chvt 1
%end


Nothing gives me the expected result







share|improve this question

























    up vote
    0
    down vote

    favorite












    My kickstart script is like this:



    %pre --log=/tmp/log
    wget --no-check-certificate http://192.168.2.33/file
    [ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
    ....
    %end


    wget command fails as the file is not available in the server. Now, I want the script to be stopped executing the installation any further and fails immediately when it sees any error with the corresponding error message showing up on the terminal screen



    I stumbled upon this option --erroronfail but it only shows the Python exception traceback calls in the console without the actual error string to show to the user why it is failed.



    I have tried the following ways:



    %pre --interpreter /bin/sh --log=/tmp/log --erroronfail
    exec < /dev/tty3 > /dev/tty3
    chvt 3
    wget --no-check-certificate http://192.168.2.33/file
    [ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
    chvt 1
    %end


    and as below too



    %pre --interpreter /bin/sh --log=/tmp/log --erroronfail
    exec < /dev/tty3 > /dev/tty3
    chvt 3
    wget --no-check-certificate http://192.168.2.33/file 2>&1 | /usr/bin/tee -a /tmp/log
    chvt 1
    %end


    Nothing gives me the expected result







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      My kickstart script is like this:



      %pre --log=/tmp/log
      wget --no-check-certificate http://192.168.2.33/file
      [ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
      ....
      %end


      wget command fails as the file is not available in the server. Now, I want the script to be stopped executing the installation any further and fails immediately when it sees any error with the corresponding error message showing up on the terminal screen



      I stumbled upon this option --erroronfail but it only shows the Python exception traceback calls in the console without the actual error string to show to the user why it is failed.



      I have tried the following ways:



      %pre --interpreter /bin/sh --log=/tmp/log --erroronfail
      exec < /dev/tty3 > /dev/tty3
      chvt 3
      wget --no-check-certificate http://192.168.2.33/file
      [ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
      chvt 1
      %end


      and as below too



      %pre --interpreter /bin/sh --log=/tmp/log --erroronfail
      exec < /dev/tty3 > /dev/tty3
      chvt 3
      wget --no-check-certificate http://192.168.2.33/file 2>&1 | /usr/bin/tee -a /tmp/log
      chvt 1
      %end


      Nothing gives me the expected result







      share|improve this question













      My kickstart script is like this:



      %pre --log=/tmp/log
      wget --no-check-certificate http://192.168.2.33/file
      [ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
      ....
      %end


      wget command fails as the file is not available in the server. Now, I want the script to be stopped executing the installation any further and fails immediately when it sees any error with the corresponding error message showing up on the terminal screen



      I stumbled upon this option --erroronfail but it only shows the Python exception traceback calls in the console without the actual error string to show to the user why it is failed.



      I have tried the following ways:



      %pre --interpreter /bin/sh --log=/tmp/log --erroronfail
      exec < /dev/tty3 > /dev/tty3
      chvt 3
      wget --no-check-certificate http://192.168.2.33/file
      [ $? -eq 0 -a -f file ] && tar --ignore-failed-read -xzvf file
      chvt 1
      %end


      and as below too



      %pre --interpreter /bin/sh --log=/tmp/log --erroronfail
      exec < /dev/tty3 > /dev/tty3
      chvt 3
      wget --no-check-certificate http://192.168.2.33/file 2>&1 | /usr/bin/tee -a /tmp/log
      chvt 1
      %end


      Nothing gives me the expected result









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jul 5 at 7:25
























      asked Jul 3 at 13:48









      Ibrahim Quraish

      1419




      1419

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453228%2frhel-anaconda-kickstart-installer-error-message-on-terminal-console-with-log-and%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453228%2frhel-anaconda-kickstart-installer-error-message-on-terminal-console-with-log-and%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay