This article relies on the following:
# Налаштування hotplug
mkdir -p / etc/ hotplug.d/ iface
cat << "EOF" > / etc/ hotplug.d/ iface/ 90 -online
if [ "${INTERFACE} " = "loopback" ]
then exit 0
fi
if [ "${ACTION} " ! = "ifup" ] \
&& [ "${ACTION} " ! = "ifupdate" ]
then exit 0
fi
if [ "${ACTION} " = "ifupdate" ] \
&& [ -z "${IFUPDATE_ADDRESSES} " ] \
&& [ -z "${IFUPDATE_DATA} " ]
then exit 0
fi
hotplug-call online
EOF
# Додати скрипт до списку збереження після оновлення прошивки
cat << "EOF" >> / etc/ sysupgrade.conf
/ etc/ hotplug.d/ iface/ 90 -online
EOF
# Приклад скрипта Hotplug
cat << "EOF" > / etc/ hotplug.d/ online/ 00-logger
logger -t hotplug $( env )
EOF
# Перезапуск мережі для перевірки
service network restart
# Перевірка логів Hotplug
logread -e hotplug
# Завантажити скрипт автоматизації
wget -U "" -O hotplug-extras.sh "https://openwrt.org/_export/code/docs/guide-user/advanced/hotplug_extras?codeblock=0"
# Запустити скрипт
. ./ hotplug-extras.sh
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.
OK More information about cookies