ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Eugene Prokopiev <enp@itx.ru>
To: shaba@altlinux.ru,
	 ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] systemd-networkd dns configuration
Date: Thu, 3 Sep 2015 08:29:12 +0300
Message-ID: <CANM4Rugv1WEJb4pZpLUuZF2b+OiFF8xoVA+q2-oozL5CMDU+jg@mail.gmail.com> (raw)
In-Reply-To: <CANM4RuhEpKk+qRUusq0p9VfHj=H2aAZY2Li747wyQ3CQfW2W5Q@mail.gmail.com>

2 сентября 2015 г., 16:02 Eugene Prokopiev написал:

>> а вот это работает нормально,  если команду заключить в кавычки
>> '/sbin/resolvconf -a systemd-networkd < /run/systemd/resolve/resolv.conf'
>
> Да, действительно, и даже /etc/resolv.conf при этом правильно
> заполняется. А вот если после перезагрузки просто запустить systemctl
> start altlinux-openresolv.service - в /etc/resolv.conf ничего не
> появится.
>
> Как это отлаживать?

Решил отлаживать так: в
/lib/systemd/system/altlinux-openresolv.service написал
ExecStart=/lib/systemd/systemd-resolvconf, а уже в последний:

#!/bin/sh

/bin/sh -c '/sbin/resolvconf -a systemd-networkd <
/run/systemd/resolve/resolv.conf'

echo ----------------- >> /tmp/resolvconf
cat /run/systemd/resolve/resolv.conf >> /tmp/resolvconf
echo ----------------- >> /tmp/resolvconf
cat /etc/resolv.conf >> /tmp/resolvconf
echo ----------------- >> /tmp/resolvconf
date >> /tmp/resolvconf
echo +++++++++++++++++ >> /tmp/resolvconf

После перезагрузки получаю:

# cat /tmp/resolvconf
-----------------
# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.

# No DNS servers known.
-----------------
# Generated by resolvconf
# Do not edit manually, use
# /etc/net/ifaces/<interface>/resolv.conf instead.
-----------------
Thu Sep  3 08:07:23 MSK 2015
+++++++++++++++++

Т.е. видимо altlinux-openresolv.service выполнился слишком рано.
Однако сейчас (после того, как система полностью загрузилась) уже не
рано, поэтому повторный запуск systemctl restart
altlinux-openresolv.service (именно restart, просто start ни к чему не
приводит) пишет в этот файл уже следующее:

-----------------
# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.

nameserver 10.7.0.2
search tx.donpac.ru
-----------------
# Generated by resolvconf
# Do not edit manually, use
# /etc/net/ifaces/<interface>/resolv.conf instead.
search tx.donpac.ru
nameserver 10.7.0.2
-----------------
Thu Sep  3 08:25:51 MSK 2015
+++++++++++++++++

Т.е. главный вопрос: почему altlinux-openresolv.service не
отрабатывает при добавлении полезной информации в
/run/systemd/resolve/resolv.conf ?

-- 
WBR,
Eugene Prokopiev

  parent reply	other threads:[~2015-09-03  5:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  8:00 Eugene Prokopiev
2015-09-02  8:57 ` Eugene Prokopiev
2015-09-02 13:02     ` Eugene Prokopiev
2015-09-02 13:20       ` Денис Смирнов
2015-09-02 13:33         ` Eugene Prokopiev
2015-09-03  5:29       ` Eugene Prokopiev [this message]
2015-09-02 17:07     ` Mikhail Efremov
2015-09-02 13:17 ` Денис Смирнов
2015-09-03  5:26   ` Sergey
2015-09-03  5:42     ` Eugene Prokopiev
2015-09-03 12:00       ` Mikhail Efremov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANM4Rugv1WEJb4pZpLUuZF2b+OiFF8xoVA+q2-oozL5CMDU+jg@mail.gmail.com \
    --to=enp@itx.ru \
    --cc=shaba@altlinux.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git