diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-02-26 01:32:06 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-02-26 01:32:42 -0600 |
commit | 71a690bba093def73351d6fd16eb48a2ee78d184 (patch) | |
tree | 203c1cb0d2cedcc10732b7df46fead29d43855c0 /etc/inc/interfaces.inc | |
parent | 59eb0ce73a3081cd1ebc5fb4088ac85625f6c266 (diff) | |
download | pfsense-71a690bba093def73351d6fd16eb48a2ee78d184.zip pfsense-71a690bba093def73351d6fd16eb48a2ee78d184.tar.gz |
Log ifconfig commands used to setup wireless interfaces
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 5b65691..60c394e 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2292,6 +2292,8 @@ function interface_wireless_configure($if, &$wl, &$wlcfg) { $fd_set = fopen("{$g['tmp_path']}/{$if}_setup.sh","w"); fwrite($fd_set, "#!/bin/sh\n"); fwrite($fd_set, "# {$g['product_name']} wireless configuration script.\n\n"); + + $wlan_setup_log = fopen("{$g['tmp_path']}/{$if}_setup.log","w"); /* set values for /path/program */ $hostapd = "/usr/sbin/hostapd"; @@ -2650,6 +2652,7 @@ EOD; /* apply the regulatory settings */ mwexec("{$ifconfig} " . escapeshellarg($if) . " {$wlregcmd_args}"); + fwrite($wlan_setup_log, "$ifconfig" . escapeshellarg($if) . "$wlregcmd_args \n"); /* bring the clones back up that were previously up */ foreach ($clones_up as $clone_if) { @@ -2674,10 +2677,14 @@ EOD; /* The mode must be specified in a separate command before ifconfig * will allow the mode and channel at the same time in the next. */ mwexec("/sbin/ifconfig " . escapeshellarg($if) . " mode " . escapeshellarg($standard)); + fwrite($wlan_setup_log, "/sbin/ifconfig " . escapeshellarg($if) . " mode " . escapeshellarg($standard) . "\n"); /* configure wireless */ $wlcmd_args = implode(" ", $wlcmd); mwexec("/sbin/ifconfig " . escapeshellarg($if) . " " . $wlcmd_args, false); + fwrite($wlan_setup_log, "/sbin/ifconfig " . escapeshellarg($if) . " " . "$wlcmd_args \n"); + fclose($wlan_setup_log); + unset($wlcmd_args, $wlcmd); |