This article relies on the following:
# Configure 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
# Example Hotplug script
cat << "EOF" > / etc/ hotplug.d/ online/ 00-logger
logger -t hotplug $( env )
EOF
# Trigger Hotplug
service network restart
# Check Hotplug log
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