From: Aleksey Avdeev <solo@solin.spb.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] ovz+veth+bridge
Date: Tue, 03 Jul 2007 13:33:59 +0400
Message-ID: <468A1807.7010309@solin.spb.ru> (raw)
In-Reply-To: <200707032201.48322.alexey.borovskoy@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]
Alexey Borovskoy пишет:
> Добрый день.
>
> Надо при старте контейнера ovz добавлять veth в бридж.
>
> Вопрос что и куда прописать? Не дайте дойти до правки скриптов,
> ибо не кошерно это.
Как без правки скриптов -- не знаю. :-(
Правил:
1. etcnet, setup-bri для возможности запуска setup-bri из командной
строки (см.
<http://git.altlinux.ru/people/solo/packages/?p=etcnet.git;a=commitdiff;h=aa23fe582ab7b0d7a2955b39c517327d570c4e4b>).
2. Скрипты ovz (к письму прилагаю)
--
С уважением. Алексей.
[-- Attachment #1.2: vz_update_bri.sh --]
[-- Type: application/x-shellscript, Size: 177 bytes --]
[-- Attachment #1.3: vznet.conf --]
[-- Type: text/plain, Size: 76 bytes --]
#! /bin/sh
EXTERNAL_SCRIPT=
POST_EXTERNAL_SCRIPT=/etc/vz/vz_update_bri.sh
[-- Attachment #1.4: vznetcfg --]
[-- Type: text/plain, Size: 1449 bytes --]
#!/bin/sh
# Copyright (C) 2000-2007 SWsoft. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
VZNETCFG=/etc/vz/vznet.conf
[ -f ${VZNETCFG} ] && source ${VZNETCFG}
usage()
{
echo "vznetcfg init veth <dev>"
}
init_veth()
{
local dev="$1"
ip link set "$dev" up
}
# Call the external script if defined
if [ -n "${EXTERNAL_SCRIPT}" -a -x "${EXTERNAL_SCRIPT}" ]; then
export VEID
exec "${EXTERNAL_SCRIPT}" $@
:
fi
if test $# -le 2; then
usage
exit 0
fi
CMD=$1
case "${CMD}$2" in
initveth)
if test $# -ne 3; then
usage
exit 1
fi
init_veth $3
;;
*)
exit 1
;;
esac
# Call the post external script if defined
if [ -n "${POST_EXTERNAL_SCRIPT}" -a -x "${POST_EXTERNAL_SCRIPT}" ]; then
exec "${POST_EXTERNAL_SCRIPT}" $@
:
fi
exit 0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 548 bytes --]
next prev parent reply other threads:[~2007-07-03 9:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-03 9:01 Alexey Borovskoy
2007-07-03 9:33 ` Aleksey Avdeev [this message]
2007-07-03 9:42 ` Dmitry V. Levin
2007-07-03 9:50 ` Aleksey Avdeev
2007-07-03 10:18 ` Dmitry V. Levin
2007-07-03 9:50 ` Alexey Borovskoy
2007-09-16 16:47 ` Aleksey Avdeev
2007-09-16 16:51 ` Aleksey Avdeev
2007-09-16 22:51 ` Aleksey Avdeev
2007-09-16 23:41 ` Aleksey Avdeev
2007-07-04 5:36 ` Eugene Prokopiev
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=468A1807.7010309@solin.spb.ru \
--to=solo@solin.spb.ru \
--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