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

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

    <bug>
          <bug_id>60872</bug_id>
          
          <creation_ts>2026-10-08 16:21:44 +0300</creation_ts>
          <short_desc>Имя хоста не сохраняется: write_computer_name пишет в /etc/network вместо /etc/sysconfig/network</short_desc>
          <delta_ts>2026-10-11 17:04:51 +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-hostname</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Ajrat Makhmutov">rauty</reporter>
          <assigned_to name="Антон Мидюков">antohami</assigned_to>
          <cc>antohami</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>301522</commentid>
    <comment_count>0</comment_count>
    <who name="Ajrat Makhmutov">rauty</who>
    <bug_when>2026-10-08 16:21:44 +0300</bug_when>
    <thetext>alterator-hostname-1.0-alt2, ALT Workstation 11.2.

Шаги воспроизведения:
1. rm -f /etc/hostname (в /etc/sysconfig/network HOSTNAME=oldhost)
2. alterator-cmdline /hostname action write computer_name newhost2
3. reboot

Ожидаемый результат:

  # hostname
  newhost2

Фактический результат:

  # hostname
  oldhost

Лог:

  # rm -f /etc/hostname
  # grep HOSTNAME /etc/sysconfig/network
  HOSTNAME=oldhost
  # alterator-cmdline /hostname action write computer_name newhost2; echo rc=$?
  rc=0
  # grep HOSTNAME /etc/sysconfig/network
  HOSTNAME=oldhost
  # ls -l /etc/hostname /etc/network
  ls: cannot access &apos;/etc/hostname&apos;: No such file or directory
  ls: cannot access &apos;/etc/network&apos;: No such file or directory
  # reboot
  # hostname
  oldhost

Причина: backend3/hostname, write_computer_name:
  local netconfig=&quot;/etc/network&quot;
/etc/network - каталог ifupdown2 (или отсутствует), проверка -f на нём
всегда ложна. Должно быть /etc/sysconfig/network, с этой правкой имя
сохраняется.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>301728</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2026-10-11 17:04:51 +0300</bug_when>
    <thetext>alterator-hostname-1.1-alt1 -&gt; sisyphus:

Sun Oct 11 2026 Anton Midyukov &lt;antohami@altlinux&gt; 1.1-alt1
- backend3/hostname: fix write hostname (Closes: 60872).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>