Fix lineup of copyright lines
and module names and other bits of formatting and typos in headercomment sections.
Do not restart unneeded services. Also triger configuration for the proper interface.
Lock rc.linkup based on interface to avoid races in between up/down events which might create a loop. This is more a timing issue but better enforce serialization here. check_reload_status forces this but not between start and stop but just between similar events. Probably need to bring more inteligence there.
use correct variable here
Simplify code flow not functional change just aesthetics.
Put a comment for the wierd code here
Handle recovering of ppp types as pppoe/l2tp/pp2p when the parent comes up. It should solve the issues present before on pppoe not recovering on link loss especially when connected directly to modem.
This is revrsed conversion. The linkup script should run after booting not during it. This should help with issues on ppp type links reported
Actually rc.linkup needs the parent search for example on ppp type wans.
Go through the same checks when called from command line and when called from fcgi.
Silence this error during bootup
Rather than set the g['booting'] on globals provide a function to test for that doing the right checks
Make this more readble and also do not trigger an interface_bring_up on a down event.
Correct the variable name typo to allow rc.linkup to function properly.
Ignore linkup/down events on disabled interfaces.
Ignore empty interfaces and ovpn ones on linkup since they should not trigger this script actions
Pass friendlyifname to handle_argument_group, not realifname. Fixes #3984. clean up some text while here.
isset($_GET) seems to always evaluate to true, use something more specific. Fixes use of rc.linkup when run from CLI. Others likely fix similar circumstances, though maybe not ones that are used anywhere.
Take care of the loops reported for OpenVPN in tap mode. Also fixes the problems of tap disappearing from bridge if its a member.
Make scripts able to react when called from FCGI with GET method
Correct typo on variable name
Enforce the checking of booting up for linkup events
Pull code from the calling place rather than the interfaces.inc
Reload routes etc when rc.linkup happens
When a link comes up, call interface_configure with p2=true. This makes it run various extra routines such as system_routing_configure - which will put back the default route or other static routes that might have been removed when the link was down.
Configure static arp inside interface_configure() since it removes all interface addresses and the static arps are removed together. It fixes #2939
Properly tune rc.linkup for dual stack
Make the script rc.linkuip compatible with ipv6 as well.
Move interfaces_staticarp_configure() to interfaces.inc where it really belongs.
Instead of deleting arp entries, reconfigure static arp. For interfaces without static arp enabled, the net effect is the same (arp entries are already deleted as part of that function). Fixes #1628
Fixes #1508. When an interface is configured as static and an up event comes manually trigger rc.newwanip so gateway and other services get restarted properly.
At least bring the interface up. Sometimes even though the linkup is reported interfaces like em(4) do not come up.
Ticket #846. Do not try to add an interface to the bridge during an event of LINK_UP.
Ticket #846. Do not reconfigure an 'none' configured interface.
partially fix linkup. ticket #656
Fix booting checks. Part of ticket #53.
fix text
Decouple filter.inc from functions.inc. There is no need to process filter functions most of the time. Include filter.inc where it is needed
Remove blank newline
Do not ignore interface events even for pppoe/pptp it does no good.
Use correct variable
Remove redundant check
Be smarter parsing the command line before passing it into handle_argument_group.This prevents bogus events being logged when (dis)connecting a cable
Bring order and simplify logic.
Rename interfaces_wan_configure to interface_configure now that it is used for all assigned interface configuration.
Merge lan configuration to the interfaces_wan.php page wich does the configuration of allother assigned interfaces.
NOTE: this is only half part of the changes the other half will come after
Continue interface improvements.
Do not reconfigure on pptp interfaces.
Check if interface is passed along, otherwise return
Switch on correct argument variableClear arp cache per interface instead of allClear arp cache for staticly configured interfaces
Do not handle blank interface names.
Ticket #1461
$config needs to be a global. Someone needs a pointy-hat!
Use $_SERVER['argvc'] and $_SERVER['argv'][$x]. This fixes the linkup issues (hotplug)
rc.linkup is a event queue of sorts. It needs to to loop through all arguments and process them in the order that they where received in.
Remove logging helper entries
Link up patch submitted by billm.
Do not loop forever
Read in argspassed
Simply note the arguments passed to rc.linkup instead of exiting.
Do not process the same events twice. A nic may be stopped and restarted but we do not want to start or stop twice.
Do not process nics twice.
Output args passed so that we can get a better idea of what is happening.
Log the interface number / opt that we are running dhclient on optional interfaces
Do not newline on syslog items
Note when arguments are passed incorrectly to rc.linkup
Instead of echoing out the value where nobody will see it, send it to log_error() so we can ensure the values are correct and aide in debugging this dhclient issue.
Woops, set $int before calling!
Pointy-hat-to: me
Do not pass opt1, pass 1 instead.
This fixes dhclient on optional interfaces.
Ticket #970
Backout last commit
Move /tmp/rc.linkup unlink operation into rc.linkup
Transfer rc.linkup over to devd
Only exit linkup when interface is not a dynamic type. Prior we where exiting only if it was DHCP which would bypass linkup events for PPPoE, etc.
Ignore hotplug event on non-dhcp interfaces
Allow plugging and unplugging of ethernet interfaces (and wireless)
Handle ethernet hotplug events correctly
MFC 7172Add rc.linkup script which will be called from devd when starting or stopping a device