<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3900</bug_id>
          
          <creation_ts>2013-02-18 12:10:57 +0000</creation_ts>
          <short_desc>systemd fails to start .sh init scripts</short_desc>
          <delta_ts>2013-05-13 15:04:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Radu Moisan">radu.moisan</assigned_to>
          <cc>holger</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>radu.moisan</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>29912</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-02-18 12:10:57 +0000</bug_when>
    <thetext>From Holger on the oe-core list:

&gt; I am using the busybox ifplugd to
&gt; configure the network on plug/un-plug of the cable. My start script ended
&gt; with .sh in the name. systemd recognized the script but failed to start
&gt; it. Renaming it to not end with .sh fixed the issue for me. This is more
&gt; like a systemd bug than OE but I wonder if we could change update-rc.d
&gt; bbclass to check the for the .sh in the start script and then complain
&gt; about it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29939</commentid>
    <comment_count>1</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-02-19 03:02:12 +0000</bug_when>
    <thetext>There&apos;s a similar bug in sysvinit in our system.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3612</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33065</commentid>
    <comment_count>2</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-05-13 10:44:50 +0000</bug_when>
    <thetext>this is not an issue anymore. I acknowledge the behavior in past, but now with lastest master (f7afeeb75993b159bb8959e0309bc5eb3978a8fb) all *.sh scripts seem to work. Tried to enable manually banner.sh and it works. Also rmnologin.sh works, as the service is alive and no warnings found in logs. Tried psplash.sh as well, and the service is started.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33068</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-05-13 15:04:43 +0000</bug_when>
    <thetext>Confirmed, this piece of code that is now enabled always and not just for some distros is the fix:

  if (endswith(name, &quot;.sh&quot;))
    /* Drop .sh suffix */
    strcpy(stpcpy(r, name) - 3, &quot;.service&quot;);</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>