Execute command on reaching ttyAutomatically Login on Debian 9.2.1 Command LineWhat is needed for a minimal...

Why are < or > required to use /dev/tcp

Prime sieve in Python

How can I get my left hand to sound legato when I'm leaping?

Encounter design and XP thresholds

I found a password with hashcat, but it doesn't work

What is the meaning of "понаехать"?

I don't like coffee, neither beer. How to politely work my way around that in a business situation?

What is the origin of Scooby-Doo's name?

"Correct me if I'm wrong"

Am I legally required to provide a (GPL licensed) source code even after a project is abandoned?

How many people are necessary to maintain modern civilisation?

When to remove insignificant variables?

Loss of power when I remove item from the outlet

Methodology: Writing unit tests for another developer

How large would a mega structure have to be to host 1 billion people indefinitely?

Dates on degrees don’t make sense – will people care?

Helping ease my back pain by studying 13 hours everyday , even weekends

How would modern naval warfare have to have developed differently for battleships to still be relevant in the 21st century?

Count All Possible Unique Combinations of Letters in a Word

Why does the Saturn V have standalone inter-stage rings?

How do I professionally let my manager know I'll quit over an issue?

What happened to Steve's Shield in Iron Man 2?

Constitutionality of U.S. Democratic Presidential Candidate's Supreme Court Suggestion

What determines the direction in which motor proteins go?



Execute command on reaching tty


Automatically Login on Debian 9.2.1 Command LineWhat is needed for a minimal systemd boot to launch getty on a virtual console?Cannot boot latest kernel update after installing on new systemRHEL Serial TTYExecute command inside another commandHow can I get systemd to use qingy as my default tty program instead of agetty (debian jessie)?What is the proper way to use ISOLINUX with UEFI?Which line in the /proc/tty/drivers reflect w command?Some confused concept: ptmx and ttyWhat is tty within Linux?Method of allocating a TTY for `/bin/sh`, when it runs without allocated TTY?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I am creating a custom Debian ISO with my script placed in /opt. The image has no desktop, so after booting it reaches the tty.



I want at this point to automatically execute my script.



Following this I've managed to autologin as user, with this code in /etc/systemd/system/getty@tty1.service.d/override.conf:



[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux


I tried adding:



ExecStart=-/path/to/my/script


But the booting process freezes before reaching the tty.



How can execute automatically my script once the system reaches the tty?










share|improve this question





























    0















    I am creating a custom Debian ISO with my script placed in /opt. The image has no desktop, so after booting it reaches the tty.



    I want at this point to automatically execute my script.



    Following this I've managed to autologin as user, with this code in /etc/systemd/system/getty@tty1.service.d/override.conf:



    [Service]
    ExecStart=
    ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux


    I tried adding:



    ExecStart=-/path/to/my/script


    But the booting process freezes before reaching the tty.



    How can execute automatically my script once the system reaches the tty?










    share|improve this question

























      0












      0








      0








      I am creating a custom Debian ISO with my script placed in /opt. The image has no desktop, so after booting it reaches the tty.



      I want at this point to automatically execute my script.



      Following this I've managed to autologin as user, with this code in /etc/systemd/system/getty@tty1.service.d/override.conf:



      [Service]
      ExecStart=
      ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux


      I tried adding:



      ExecStart=-/path/to/my/script


      But the booting process freezes before reaching the tty.



      How can execute automatically my script once the system reaches the tty?










      share|improve this question














      I am creating a custom Debian ISO with my script placed in /opt. The image has no desktop, so after booting it reaches the tty.



      I want at this point to automatically execute my script.



      Following this I've managed to autologin as user, with this code in /etc/systemd/system/getty@tty1.service.d/override.conf:



      [Service]
      ExecStart=
      ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux


      I tried adding:



      ExecStart=-/path/to/my/script


      But the booting process freezes before reaching the tty.



      How can execute automatically my script once the system reaches the tty?







      boot tty






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      guillermo chamorroguillermo chamorro

      16610




      16610






















          0






          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          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%2f525749%2fexecute-command-on-reaching-tty%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f525749%2fexecute-command-on-reaching-tty%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...