<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div> <br> <div id="bloop_sign_1488045573403324160" class="bloop_sign"></div> <br><p class="airmail_on">On February 25, 2017 at 11:19:25, Joshua Kramer (<a href="mailto:joskra42.list@gmail.com">joskra42.list@gmail.com</a>) wrote:</p> <div><blockquote type="cite" class="clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span><div><div></div><div>Hello,<span class="Apple-converted-space"> </span><br><br></div></div></span></blockquote>...<br><blockquote type="cite" class="clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span><div><div><br>The problem I have is, I can&#39;t get SystemD to pause startup while<span class="Apple-converted-space"> </span><br>either of those scripts is running. On startup, SystemD starts the<span class="Apple-converted-space"> </span><br>un-tar job and merrily carries along starting everything else,<span class="Apple-converted-space"> </span><br>including some jobs (i.e. Postgres) that depend on files under /var.<span class="Apple-converted-space"> </span><br>On shutdown, the tar file is truncated because the tar job is not<span class="Apple-converted-space"> </span><br>finished by the time the shutdown target cuts the power.<span class="Apple-converted-space"> </span><br><br>This is Raspbian. Though eventually I want to do the same thing with<span class="Apple-converted-space"> </span><br>RedSleeve (it&#39;s a RHEL6/7 clone that runs on Raspi). Here is what I<span class="Apple-converted-space"> </span><br>have. (Note that I have tried changing the Type to simple.)</div></div></span></blockquote></div><p>While I can&#39;t speak to the specific clone you&#39;re referring to, RHEL 6 and 7 are different. RHEL 6 uses SysV type init scripts (ala chkconfig), while RHEL 7 uses systemd style. (RHEL 7 technically sort of supports SysV style, but it can get kind of bitchy out them sometimes.) RHEL 6 does not support systemd.</p><p>That aside, what you&#39;re running into, forgive the expression, is a feature of systemd - parallel startup. With more memory, more and faster cores, faster storage, etc there&#39;s no good reason things can&#39;t start in parallel greatly speeding up the boot process. It&#39;s been some months since I last messed with a systemd script, but I think to get you down the right path what you&#39;re going to need to do is look at the concepts of dependencies and maybe targets.</p><p>With SysV style scripts, you set the sequence number so that you ended up with a bunch of symlinks like S10.lpd, S11.ntpd, K99httpd, etc. S for start, K for kill and they would execute, one at a time (serially), in numeric/alphabetical order. If you need ntpd to start before lpd (I&#39;m making these up), you need to change the sequence number (priority?) of lpd to at least 12, or ntpd to less than 10.</p><p>SystemD did away with that in favor of a more flexible system that allows using explicit dependencies - before, after, requires, wants.</p><p>I think this the concept that you&#39;re chasing. This post may help explain it better -</p><p><a href="https://fedoramagazine.org/systemd-unit-dependencies-and-order/">https://fedoramagazine.org/systemd-unit-dependencies-and-order/</a></p><p>HTH-rick</p></body></html>