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

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

    <bug>
          <bug_id>49914</bug_id>
          
          <creation_ts>2024-04-05 14:30:12 +0300</creation_ts>
          <short_desc>Добавить install2-init-functions для запуска команды</short_desc>
          <delta_ts>2024-11-04 00:11:26 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>alterator-postinstall</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Shemetov">berkut_174</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <cc>cas</cc>
    
    <cc>max.gordeef</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>244198</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Shemetov">berkut_174</who>
    <bug_when>2024-04-05 14:30:12 +0300</bug_when>
    <thetext>для варианта:

(&quot;/postinstall/laststate&quot; run &quot;command arg1 arg2&quot;)

предлагаю сделать так:

  if [ -n &quot;$in_run&quot; ] ; then
  	  destfile=&quot;$outdir/99-zz-auto_postinstall_run.sh&quot;
	  echo &quot;#!/bin/sh&quot; &gt; $destfile
	  echo &quot;# alterator-postinstall create it&quot; &gt;&gt; $destfile
	  echo &quot;. install2-init-functions&quot; &gt;&gt; $destfile
	  echo &quot;$in_run&quot;  &gt;&gt; $destfile
	  chmod a+x $destfile
	  printf &apos;%s run:%s - OK\n&apos; &quot;$(date +%T)&quot; &quot;$in_run&quot; &gt;&amp;2
  fi

чтобы можно было запускать команды в чруте:

(&quot;/postinstall/laststate&quot; run &quot;exec_chroot date +%s &gt; /timestamp&quot;)

потому что все скрипты в postinstall.d подразумевают этот инклуд</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>