From: "George V. Kouryachy" <george@altlinux.org>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] dhcp раздача IP только известным MAC
Date: Sun, 12 Jul 2009 22:55:51 +0400
Message-ID: <20090712185551.GG28628@imap.altlinux.org> (raw)
In-Reply-To: <4A549B86.4080508@eor.samara.ru>
On Wed, Jul 08, 2009 at 06:13:42PM +0500, Коротков Георгий wrote:
> host buk1 {
> hardware ethernet 00:1C:25:A2:C3:05;
> }
> host buk2 {
> hardware ethernet 00:1B:38:12:30:92;
> }
> host buk3 {
> hardware ethernet 00:24:8c:05:9c:62;
> }
> }
>
> Единственно - напрягает копипаст конструкции host
> Никак нельзя считать MAC просто из текстового файла?
N=1; while read s; do echo "host buk$N { hardware ethernet $s; }"; let N=N+1; done < текстовый_файл
В vim вообще одной командой можно это вставить:
:/host buk1 /,/^}/!всё_то_же_самое
И команду эту прямо в конфиге в комментариях сохранить, чтобы не париться потом.
--
George V. Kouryachy (aka Fr. Br. George)
mailto:george at altlinux_org
prev parent reply other threads:[~2009-07-12 18:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 7:37 Коротков Георгий
2009-07-06 10:24 ` Maxim Tyurin
2009-07-06 11:03 ` Коротков Георгий
2009-07-06 11:36 ` Maxim Tyurin
2009-07-06 14:24 ` Коротков Георгий
2009-07-06 14:52 ` Maxim Tyurin
2009-07-07 13:51 ` Olvin
2009-07-07 16:05 ` Коротков Георгий
2009-07-08 7:20 ` Olvin
2009-07-08 7:39 ` Dmitriy Kruglikov
2009-07-24 19:47 ` Michael Shigorin
2009-07-06 13:27 ` [Sysadmins] dhcp ÒÁÚÄÁÞÁ IP ÔÏÌØËÏ ÉÚ×ÅÓÔÎÙÍ MAC MisHel64
2009-07-08 13:13 ` [Sysadmins] dhcp раздача IP только известным MAC Коротков Георгий
2009-07-12 18:55 ` George V. Kouryachy [this message]
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=20090712185551.GG28628@imap.altlinux.org \
--to=george@altlinux.org \
--cc=sysadmins@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 sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/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 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git