ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] Просьба помощи: dhcp-ipv4ll / dhcp-static
@ 2014-09-09 12:06 Денис Смирнов
  0 siblings, 0 replies; only message in thread
From: Денис Смирнов @ 2014-09-09 12:06 UTC (permalink / raw)
  To: sisyphus


[-- Attachment #1.1: Type: text/plain, Size: 525 bytes --]

В процесс работы над генератором systemd units из конфига etcnet возникла
проблема -- что делать с BOOTPROTO=dhcp-ipv4ll и dhcp-static? Как писать
такие юниты?

В аттаче пример юнита для BOOTPROTO=dhcp.

Можно задействовать механизм OnFailure, и генерировать сразу несколько
юнитов для одного интерфейса.

Только тогда я начинаю окончательно путаться в зависимостях между ними --
как мне тогда создать target, поднятие которого означало бы, что интерфейс
поднят.

-- 
С уважением, Денис

http://mithraen.ru/

[-- Attachment #1.2: net-iface-eth-uplink.service --]
[-- Type: text/plain, Size: 987 bytes --]

[Unit]
SourcePath=/etc/net/ifaces/eth-uplink
Description=Network interface: eth-uplink
After=network-pre.target
After=etcnet-pre.target
BindsTo=etcnet-pre.target
Before=network.target
Wants=ntpd.service
Before=ntpd.service
After=sys-subsystem-net-devices-eth\x2duplink.device
Wants=sys-subsystem-net-devices-eth\x2duplink.device
Wants=net-module-r8169.service
After=net-module-r8169.service

[Service]
Type=simple
TimeoutStopSec=3
ExecStartPre=-/sbin/ip link set dev eth-uplink down
ExecStartPre=/sbin/ip link set dev eth-uplink up
ExecStartPre=/sbin/ip -4 address flush dev eth-uplink
ExecStartPost=-/bin/sh -c "/sbin/resolvconf -a eth-uplink < /etc/net/ifaces/eth-uplink/resolv.conf"
ExecStopPost=-/sbin/resolvconf -d eth-uplink
ExecStop=/sbin/ip -4 address flush dev eth-uplink
ExecStop=/sbin/ip link set dev eth-uplink down
ExecStart=/sbin/dhcpcd --noarp -B -C resolv.conf eth-uplink
ExecStop=/sbin/dhcpcd -x eth-uplink
ExecStartPost=-/etc/net/ifaces/eth-uplink/ifup-post eth-uplink

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-09 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 12:06 [sisyphus] Просьба помощи: dhcp-ipv4ll / dhcp-static Денис Смирнов

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