Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:advanced:hotplug_extras [2023/10/03 07:35] – improve compatibility with PBR vgaeteradocs:guide-user:advanced:hotplug_extras [2023/10/03 18:12] – [Instructions] avoid global delay, use delay per script if necessary vgaetera
Line 20: Line 20:
 mkdir -p /etc/hotplug.d/iface mkdir -p /etc/hotplug.d/iface
 cat << "EOF" > /etc/hotplug.d/iface/90-online cat << "EOF" > /etc/hotplug.d/iface/90-online
 +if [ "${INTERFACE}" = "loopback" ]
 +then exit 0
 +fi
 if [ "${ACTION}" != "ifup" ] \ if [ "${ACTION}" != "ifup" ] \
 && [ "${ACTION}" != "ifupdate" ] && [ "${ACTION}" != "ifupdate" ]
Line 33: Line 36:
 cat << "EOF" >> /etc/sysupgrade.conf cat << "EOF" >> /etc/sysupgrade.conf
 /etc/hotplug.d/iface/90-online /etc/hotplug.d/iface/90-online
-EOF 
-mkdir -p /etc/hotplug.d/online 
-cat << "EOF" > /etc/hotplug.d/online/10-sleep 
-sleep 10 
-EOF 
-cat << "EOF" >> /etc/sysupgrade.conf 
-/etc/hotplug.d/online/10-sleep 
 EOF EOF
 </code> </code>
Line 46: Line 42:
 <code bash> <code bash>
 # Example script # Example script
-cat << "EOF" > /etc/hotplug.d/online/00-log +cat << "EOF" > /etc/hotplug.d/online/00-logger 
-echo $(date +%c) ${@} $(env) >> /var/log/hotplug-online+logger -t hotplug $(env)
 EOF EOF
 /etc/init.d/network restart /etc/init.d/network restart
-tail -f /var/log/hotplug-online+logread -hotplug
 </code> </code>
  
  • Last modified: 2023/10/14 05:44
  • by vgaetera