<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>5080</bug_id>
          
          <creation_ts>2004-08-27 03:22:02 +0400</creation_ts>
          <short_desc>/sbin/service incorrectly intercepts command line arguments passed to service</short_desc>
          <delta_ts>2007-04-21 16:22:51 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>service</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="evseev">evseev</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>legion</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>18386</commentid>
    <comment_count>0</comment_count>
    <who name="evseev">evseev</who>
    <bug_when>2004-08-27 03:22:02 +0400</bug_when>
    <thetext>/sbin/service looks for command line switches even after service name. So, 
&quot;service testd -huh&quot; is processed like &quot;service -huh testd&quot;, not like 
&quot;/etc/init.d/testd -huh&quot;. My little patch fixes this.

--- service.orig	2004-01-25 20:44:48 +0300
+++ service	2004-08-27 03:06:05 +0400
@@ -50,7 +50,9 @@
 			exit 0
 			;;
 		-*)
-			usage 1
+			test -z &quot;$SERVICE&quot; &amp;&amp; usage 1
+			OPTIONS=&quot;$OPTIONS $1&quot;
+			shift
 			;;
 		*)
 			if [ $# -eq 2 -a &quot;$2&quot; = &quot;--full-restart&quot; ]; then

Steps to Reproduce:
/sbin/service anything -anything

Actual Results:  
/sbin/service displays usage and fails.

Expected Results:  
Tail of command line should be passed directly to called service.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18532</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2004-09-01 19:38:14 +0400</bug_when>
    <thetext>First, startup scripts usually have no option parser, so your script is probably
first one.

Second, your patch doesn&apos;t make possible to pass .e.g --help option to startup
script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22435</commentid>
    <comment_count>2</comment_count>
      <attachid>767</attachid>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2005-03-09 15:46:17 +0300</bug_when>
    <thetext>Created attachment 767
Proposed change

I&apos;m going to apply this change to /sbin/service.
Objections?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22438</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2005-03-09 16:07:20 +0300</bug_when>
    <thetext>Applied in 0.5.7-alt1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>767</attachid>
            <date>2005-03-09 15:46:17 +0300</date>
            <delta_ts>2005-03-09 15:46:17 +0300</delta_ts>
            <desc>Proposed change</desc>
            <filename>service.diff</filename>
            <type>text/plain</type>
            <size>1266</size>
            <attacher name="Dmitry V. Levin">ldv</attacher>
            
              <data encoding="base64">SW5kZXg6IHNlcnZpY2UKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2hvbWUvY3ZzL2N2c3Jvb3Qvc2Vy
dmljZS9zZXJ2aWNlLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjkKZGlmZiAtdSAtcCAtcjEuOSBz
ZXJ2a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