Revision 95d2d24b
Added by Chris Buechler over 10 years ago
etc/inc/interfaces.inc | ||
---|---|---|
2299 | 2299 |
$fd_set = fopen("{$g['tmp_path']}/{$if}_setup.sh","w"); |
2300 | 2300 |
fwrite($fd_set, "#!/bin/sh\n"); |
2301 | 2301 |
fwrite($fd_set, "# {$g['product_name']} wireless configuration script.\n\n"); |
2302 |
|
|
2303 |
$wlan_setup_log = fopen("{$g['tmp_path']}/{$if}_setup.log","w"); |
|
2302 | 2304 |
|
2303 | 2305 |
/* set values for /path/program */ |
2304 | 2306 |
$hostapd = "/usr/sbin/hostapd"; |
... | ... | |
2657 | 2659 |
|
2658 | 2660 |
/* apply the regulatory settings */ |
2659 | 2661 |
mwexec("{$ifconfig} " . escapeshellarg($if) . " {$wlregcmd_args}"); |
2662 |
fwrite($wlan_setup_log, "$ifconfig" . escapeshellarg($if) . "$wlregcmd_args \n"); |
|
2660 | 2663 |
|
2661 | 2664 |
/* bring the clones back up that were previously up */ |
2662 | 2665 |
foreach ($clones_up as $clone_if) { |
... | ... | |
2681 | 2684 |
/* The mode must be specified in a separate command before ifconfig |
2682 | 2685 |
* will allow the mode and channel at the same time in the next. */ |
2683 | 2686 |
mwexec("/sbin/ifconfig " . escapeshellarg($if) . " mode " . escapeshellarg($standard)); |
2687 |
fwrite($wlan_setup_log, "/sbin/ifconfig " . escapeshellarg($if) . " mode " . escapeshellarg($standard) . "\n"); |
|
2684 | 2688 |
|
2685 | 2689 |
/* configure wireless */ |
2686 | 2690 |
$wlcmd_args = implode(" ", $wlcmd); |
2687 | 2691 |
mwexec("/sbin/ifconfig " . escapeshellarg($if) . " " . $wlcmd_args, false); |
2692 |
fwrite($wlan_setup_log, "/sbin/ifconfig " . escapeshellarg($if) . " " . "$wlcmd_args \n"); |
|
2693 |
fclose($wlan_setup_log); |
|
2694 |
|
|
2688 | 2695 |
unset($wlcmd_args, $wlcmd); |
2689 | 2696 |
|
2690 | 2697 |
|
Also available in: Unified diff
Log ifconfig commands used to setup wireless interfaces