LINUX.ORG.RU
ФорумAdmin

FreeBSD: netgraph ngctl, подскажите по старт- скрипту....


0

0

#!/bin/sh
#
# $Id$
#
ext_if=fxp0
int_if0=em0
case "$1" in
start)
        /usr/sbin/ngctl -f- <<-SEQ
                mkpeer ${ext_if}: tee lower right
                name ${ext_if}:lower ext_tee
                connect ${ext_if}: ext_tee: upper left
                mkpeer ${int_if0}: tee lower right
                name ${int_if0}:lower int_tee0
                connect ${int_if0}: int_tee0: upper left
                mkpeer ext_tee: netflow right2left iface0
                name ext_tee:right2left netflow
                connect ext_tee: netflow: left2right iface1
                connect int_tee0: netflow: left2right iface2
                connect int_tee0: netflow: right2left iface3
                mkpeer netflow: ksocket export inet/dgram/udp
                msg netflow:export connect inet/127.0.0.1:20001

        SEQ

        ;;
stop)
        /usr/sbin/ngctl shutdown netflow:
        /usr/sbin/ngctl shutdown ext_tee:
        /usr/sbin/ngctl shutdown int_tee0:
        /usr/sbin/ngctl shutdown ${int_if0}:
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        ;;
esac
exit 0
rnd_ip $1
*****************************************************************
При запуске ругается вот так, в скрипте везде поставил табы.
# /root/netflow start
ngctl: send msg: File exists
ngctl: line 1: error in file
А при шотдауне говорит так...
# /root/netflow stop
ngctl: shutdown: No such file or directory
ngctl: shutdown: No such file or directory
ngctl: shutdown: No such file or directory
# /usr/sbin/ngctl shutdown netflow:
ngctl: shutdown: No such file or directory
Как так но сач файл оф директори?

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.