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

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

    <bug>
          <bug_id>32617</bug_id>
          
          <creation_ts>2016-10-16 22:05:29 +0300</creation_ts>
          <short_desc>Не сохраняется чекбокс &quot;Сервис SSHd включен&quot;</short_desc>
          <delta_ts>2019-12-23 18:37:03 +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-sshd</component>
          <version>unstable</version>
          <rep_platform>all</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>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmytro">d20052005</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>159229</commentid>
    <comment_count>0</comment_count>
    <who name="Dmytro">d20052005</who>
    <bug_when>2016-10-16 22:05:29 +0300</bug_when>
    <thetext>Не сохраняется чекбокс &quot;Сервис SSHd включен&quot;. При этом, сервис песле перезагрузки нормально стартует.Т.е.включение происходит.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159326</commentid>
    <comment_count>1</comment_count>
    <who name="Dmytro">d20052005</who>
    <bug_when>2016-10-20 16:41:01 +0300</bug_when>
    <thetext>Немного покопался на досуге.
В бэкенде нашел код, отвечающий за этот чекбокс

state()
{
       echo &quot;$(/sbin/chkconfig --list | grep sshd)&quot; | grep -v -q &quot;:on&quot;; write_bool_param daemon &quot;$?&quot;
    write_string_param cur_status &quot;$($service status)&quot;
}

Из скрипта видно, что он может работать только на Sysvinit, причем, только с английской локалью. нужно добавить поддержку systemd  и локаль.

На systemd проверка может выглядеть, например, так:

echo &quot;$(systemctl status sshd | grep Active)&quot; | grep -v -q &quot;active (running)&quot;; write_bool_param daemon &quot;$?&quot;

Для Sysv с русской локалью можно в оригинальном скрипте условие проверки подкорректировать grep -v -q &quot;:on&quot; на grep -v -q &quot;:вкл&quot;

Сейчас думаю, как это в 1 команду собрать... Знаний маловато (</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>186548</commentid>
    <comment_count>2</comment_count>
    <who name="Dmytro">d20052005</who>
    <bug_when>2019-12-23 18:37:03 +0300</bug_when>
    <thetext>Еще актуально</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>