<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am using a simple shell script, started by system, to set LEDs on a Marvell Armada 370 plug.<o:p></o:p></p>
<p class="MsoNormal">The script uses a while loop with a "sleep 30" line<o:p></o:p></p>
<p class="MsoNormal">Exiting sleep seems to log to the journal, filling it with useless info.<o:p></o:p></p>
<p class="MsoNormal">How can I change this behavior?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have tried different service types (fork, oneshot) as well as an intermediate shell script which starts the real script, no luck!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The journal output looks like:<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:19:12 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 48min ago<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:18:57 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 48min ago<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:18:42 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:18:27 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:18:12 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:17:57 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 47min ago<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:17:42 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 46min ago<o:p></o:p></p>
<p class="MsoNormal">Dec 22 19:17:27 rrap-0281aa.local LEDupdater.sh[188]: Active: active (running) since Mon 2014-12-22 18:30:45 UTC; 46min ago<o:p></o:p></p>
<p class="MsoNormal">lines 1-39<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The service looks like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[root@rrap-0281aa system]# cat rrap_leds.service<o:p></o:p></p>
<p class="MsoNormal">[Unit]<o:p></o:p></p>
<p class="MsoNormal">Description=start LED service<o:p></o:p></p>
<p class="MsoNormal">After=syslog.target network.target<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[Service]<o:p></o:p></p>
<p class="MsoNormal">Type=simple<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ExecStart=/sbin/LEDupdater.sh<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[Install]<o:p></o:p></p>
<p class="MsoNormal">WantedBy=multi-user.target<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My shell script while loop looks something like this:<o:p></o:p></p>
<p class="MsoNormal">while true ; do<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># blue is wifi status<o:p></o:p></p>
<p class="MsoNormal">if isHostapdUp ; then<o:p></o:p></p>
<p class="MsoNormal">echo "default-on" > $Trigger_Blue<o:p></o:p></p>
<p class="MsoNormal">else<o:p></o:p></p>
<p class="MsoNormal">echo "none" > $Trigger_Blue<o:p></o:p></p>
<p class="MsoNormal">if ! isInterfacePresent wlp1s0 ; then<o:p></o:p></p>
<p class="MsoNormal">FAILCNT=$((FAILCNT+1))<o:p></o:p></p>
<p class="MsoNormal"># echo "wlp1s0 is down $FAILCNT "<o:p></o:p></p>
<p class="MsoNormal">fi<o:p></o:p></p>
<p class="MsoNormal">fi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># yellow is eth1 status<o:p></o:p></p>
<p class="MsoNormal">if isInterfaceDown eth1 ; then<o:p></o:p></p>
<p class="MsoNormal">echo "none" > $Trigger_Yellow<o:p></o:p></p>
<p class="MsoNormal">else<o:p></o:p></p>
<p class="MsoNormal">echo "default-on" > $Trigger_Yellow<o:p></o:p></p>
<p class="MsoNormal">fi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">if [ "$FAILCNT" -gt "$MAXFAILCNT" ] ; then<o:p></o:p></p>
<p class="MsoNormal">echo "missing wlp1s0; rebooting " `date` >> /var/log/pciBug.log<o:p></o:p></p>
<p class="MsoNormal">`reboot`<o:p></o:p></p>
<p class="MsoNormal">fi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">sleep 15<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">done<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Larry Harmon</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Larry Harmon | Sr. Embedded Engineer<br>
<br>
Turning Technologies | 255 West Federal Street | Youngstown, OH 44503<br>
Direct: 330-531-7664 | Main: 330-746-3015 | Toll Free: 866-746-3015 </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">| SKYPE larry.harmon54</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><a href="mailto:lharmon@turningtechnologies.com"><span style="color:blue">lharmon@turningtechnologies.com</span></a><span style="color:black"> | </span></span><a href="http://www.turningtechnologies.com/" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">www.TurningTechnologies.com</span></a><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:3.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"> <img border="0" width="185" height="46" id="Picture_x0020_3" src="cid:image001.png@01D0237A.5FFA0EF0" alt="cid:image001.png@01CE9E4C.2D88DB90"></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:3.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Stay Connected</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> -<span style="color:#1F497D">
</span></span><a href="https://twitter.com/turningtech" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">@TurningTech </span></a><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">·<span style="color:#1F497D">
</span></span></b><a href="http://www.facebook.com/#!/pages/Turning-Technologies/104796086230111?ref=ts" target="_blank"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:blue">Facebook</span></a><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:7.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.0pt;font-family:"Arial","sans-serif"">This e-mail message, including any attached files, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the intended recipient or</span><span lang="EN" style="font-size:7.0pt;font-family:"Arial","sans-serif""> you wish to discontinue receiving any future e-mails from the vendor featured in
this message, please send an </span><a href="mailto:info@turningtechnologies.com?subject=unsubscribe"><b><span lang="EN" style="font-size:7.0pt;font-family:"Arial","sans-serif";color:windowtext">e-mail request</span></b></a><span lang="EN" style="font-size:7.0pt;font-family:"Arial","sans-serif"">.</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>