This patch does two things:
The scripts are still missing real commands to stop ATM. This is not easy, because by design the ATM stuff is not supposed to be stopped. The two scripts have been .sh scripts formerly, because they needed to communicate variables from one to the other. This has been fixed by obtainig the list of interface in each script via atm(9).
This also fixes a bug that was probably introduced by the split of rc.atm: atm1 also needed to communicated the list of physical interfaces to atm2. This has been fixed.
This is tricky, because of the layering of drivers:
The problem that arises is that the real hardware interfaces must be brought up via 'ifconfig XatmN up' before atm1 is run. But netif must be run after atm1 because atm1 creates the network interfaces that are to be configured in netif.
The patch hacks around the problem by using an additional rc.conf variable 'natm_interfaces'. atm1 does an 'ifconfig up' for all interfaces in this list.