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: vz_update_bri.sh
Description: application/shellscript

#! /bin/sh

EXTERNAL_SCRIPT=
POST_EXTERNAL_SCRIPT=/etc/vz/vz_update_bri.sh

#!/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: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Sysadmins mailing list
[email protected]
https://lists.altlinux.org/mailman/listinfo/sysadmins

Ответить