LINUX.ORG.RU

История изменений

Исправление vel, (текущая версия) :

нормальный dhcp-клиент (isc dhclient) умеет править /etc/resolv.cof и добавлять DGW.

Там есть скрипт (/sbin/dhclient-script) в котором можно добавить все что хочешь через хуки.

exit_with_hooks выполняется в самом начале и конце каждого вызова

exit_with_hooks() {
    exit_status=$1

    # Source the documented exit-hook script, if it exists
    if ! run_hook /etc/dhclient-exit-hooks; then
        exit_status=$?
    fi

    # Now run scripts in the Debian-specific directory.
    if ! run_hookdir /etc/dhclient-exit-hooks.d; then
        exit_status=$?
    fi

    exit $exit_status
}

Исправление vel, :

нормальный dhcp-клиент (isc dhclient) умеет править /etc/resolv.cof и добавлять DGW.

Там есть скрипт (/sbin/dhclient-script) в котором можно добавить все что хочешь через хуки.

exit_with_hooks выполняется в самом конце каждого вызова

exit_with_hooks() {
    exit_status=$1

    # Source the documented exit-hook script, if it exists
    if ! run_hook /etc/dhclient-exit-hooks; then
        exit_status=$?
    fi

    # Now run scripts in the Debian-specific directory.
    if ! run_hookdir /etc/dhclient-exit-hooks.d; then
        exit_status=$?
    fi

    exit $exit_status
}

Исходная версия vel, :

нормальный dhcp-клиент (isc dhclient) умеет править /etc/resolv.cof и добавлять DGW.

Там есть скрипт (/sbin/dhclient-script) в котором можно добавить все что хочешь через хуки.