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

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

    <bug>
          <bug_id>32445</bug_id>
          
          <creation_ts>2016-08-28 16:38:31 +0300</creation_ts>
          <short_desc>incorrect installation of localhost&apos;s domain causes long resolving when running programs</short_desc>
          <delta_ts>2017-01-19 19:49:31 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Distributions</classification>
          <product>Regular</product>
          <component>wmaker</component>
          <version>не указана</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>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Michael Shigorin">mike</assigned_to>
          <cc>sem</cc>
          
          <qa_contact name="Andrey Cherepanov">cas</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>158326</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-08-28 16:38:31 +0300</bug_when>
    <thetext>basealt-p8-wmaker-20160612-x86_64.iso
emacs24-nox-24.5-alt16

I&apos;ve noticed that after the installation of the system, some programs have a very long startup time. (For example, emacs24-nox starts almost eternally; I suspect that the long startup of syslogd may be also related.)

The reason was that it tried to resolve the host&apos;s FQDN sending the queries many times.

The reason is:

$ cat etc/sysconfig/network 
# When set to no, this may cause most daemons&apos; initscripts skip starting.
NETWORKING=yes

# Used by hotplug/pcmcia/ifplugd scripts to detect current network config
# subsystem.
CONFMETHOD=etcnet

# Used by rc.sysinit to setup system hostname at boot.
HOSTNAME=comp-sempron-processor-266d91
DOMAINNAME=localdomain

# This is used by ALTLinux ppp-common to decide if we want to install
# nameserver lines into /etc/resolv.conf or not.
RESOLV_MODS=yes
$ 

Actually, f we want to install
# nameserver lines into /etc/resolv.conf or not.
RESOLV_MODS=yes
$ 

Actually, DOMAINNAMEinto /etc/resolv.conf or not.
RESOLV_MODS=yes
$ 

Actually, f we want to install
# nameserver lines into /etc/resolv.conf or not.
RESOLV_MODS=yes
$ 

Actually, DOMAINNAME is not used.

[user@test ~]$ fgrep DOMAINNAME -r /etc/rc.d /etc/net
[user@test ~]$ fgrep HOSTNAME -r /etc/rc.d /etc/net
/etc/rc.d/init.d/local: echo &quot;Welcome to $HOSTNAME&quot; &gt;/etc/issue.net
/etc/rc.d/rc.sysinit:HOSTNAME=`hostname`
/etc/rc.d/rc.sysinit:if [ -x &quot;$RESOLVE_HOSTNAME_COMMAND&quot; ]; then
/etc/rc.d/rc.sysinit:   HOSTNAME=&quot;$(&quot;$RESOLVE_HOSTNAME_COMMAND&quot;)&quot;
/etc/rc.d/rc.sysinit:if [ -z &quot;$HOSTNAME&quot; -o &quot;$HOSTNAME&quot; = &quot;(none)&quot; ]; then
/etc/rc.d/rc.sysinit:   HOSTNAME=localhost
/etc/rc.d/rc.sysinit:action &quot;Setting hostname $HOSTNAME:&quot; hostname &quot;$HOSTNAME&quot;
/etc/rc.d/rc.sysinit:   [ &quot;$(readlink /etc/HOSTNAME)&quot; = /proc/sys/kernel/hostname ] ||
/etc/rc.d/rc.sysinit:           ln -snf /proc/sys/kernel/hostname /etc/HOSTNAME
/etc/net/scripts/functions-ip:                  if [ -n &quot;$DHCP_HOSTNAME&quot; ]; then
/etc/net/scripts/functions-ip:                          case &quot;$DHCP_HOSTNAME&quot; in
/etc/net/scripts/functions-ip:                                          print_warning &quot;AUTO in DHCP_HOSTNAME is no longer supported.&quot;
/etc/net/scripts/functions-ip:                                          [ -n &quot;$HOSTNAME&quot; -a &quot;$HOSTNAME&quot; != &quot;localhost&quot; -a &quot;$HOSTNAME&quot; != &quot;localhost.localdomain&quot; ] &amp;&amp; \
/etc/net/scripts/functions-ip:                                          H=&quot;-h $HOSTNAME&quot;
/etc/net/scripts/functions-ip:                                          H=&quot;-h $DHCP_HOSTNAME&quot;
/etc/net/scripts/functions-ip:                  if [ -n &quot;$DHCP_HOSTNAME&quot; ]; then
/etc/net/scripts/functions-ip:                          case &quot;$DHCP_HOSTNAME&quot; in
/etc/net/scripts/functions-ip:                                          [ -n &quot;$HOSTNAME&quot; -a &quot;$HOSTNAME&quot; != &quot;localhost&quot; -a &quot;$HOSTNAME&quot; != &quot;localhost.localdomain&quot; ] &amp;&amp; \
/etc/net/scripts/functions-ip:                                          H=&quot;-F $HOSTNAME&quot;
/etc/net/scripts/functions-ip:                                          H=&quot;-H $DHCP_HOSTNAME&quot;
/etc/net/scripts/functions:     elif [ -s &quot;$HOSTTAB&quot; ] &amp;&amp; grep &quot;^$HOSTNAME &quot; $HOSTTAB; then
/etc/net/scripts/functions:             NETHOST=`$DENOISE $HOSTTAB | trim | grep -m 1 &quot;^$HOSTNAME &quot; | cut -d&apos; &apos; -f2`
/etc/net/scripts/functions:             NETHOST=$HOSTNAME
/etc/net/options.d/50-ALTLinux-server:DHCP_HOSTNAME=localhost
[user@test ~]$ 

Then, I ran alterator, and changed the hostname there. The correct way to configure it is as by alterator:

$ cat /etc/sysconfig/network 
# When set to no, this may cause most daemons&apos; initscripts skip starting.
NETWORKING=yes

# Used by hotplug/pcmcia/ifplugd scripts to detect current network config
# subsystem.
CONFMETHOD=etcnet

# Used by rc.sysinit to setup system hostname at boot.
HOSTNAME=test.localdomain

# This is used by ALTLinux ppp-common to decide if we want to install
# nameserver lines into /etc/resolv.conf or not.
RESOLV_MODS=yes
[user@test ~]$ 

(Now, emacs starts quickly.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>158347</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-08-30 16:21:53 +0300</bug_when>
    <thetext>BTW, initially, the packaged file is good:


$ rpmpeek /ALT/Sisyphus/noarch/RPMS.classic/etcnet-0.9.10-alt18.noarch.rpm cat etc/sysconfig/network
# When set to no, this may cause most daemons&apos; initscripts skip starting.
NETWORKING=yes

# Used by hotplug/pcmcia/ifplugd scripts to detect current network config
# subsystem.
CONFMETHOD=etcnet

# Used by rc.sysinit to setup system hostname at boot.
HOSTNAME=localhost.localdomain
DOMAINNAME=localdomain

# This is used by ALTLinux ppp-common to decide if we want to install
# nameserver lines into /etc/resolv.conf or not.
RESOLV_MODS=yes

But somehow after installer&apos;s work, the domain is lost from HOSTNAME.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>