diff --git a/ajax/networking/save_int_config.php b/ajax/networking/save_int_config.php index 77593f32..77fcd865 100644 --- a/ajax/networking/save_int_config.php +++ b/ajax/networking/save_int_config.php @@ -1,47 +1,4 @@ $val) { - if(is_array($val)) { - $res[] = "[$key]"; - foreach($val as $skey => $sval) $res[] = "$skey = ".(is_numeric($sval) ? $sval : '"'.$sval.'"'); - } - else $res[] = "$key = ".(is_numeric($val) ? $val : '"'.$val.'"'); - } - if(safefilerewrite($file, implode("\r\n", $res))) { - return true; - } else { - return false; - } -} - -function safefilerewrite($fileName, $dataToSave) { - if ($fp = fopen($fileName, 'w')) { - $startTime = microtime(TRUE); - do { - $canWrite = flock($fp, LOCK_EX); - // If lock not obtained sleep for 0 - 100 milliseconds, to avoid collision and CPU load - if(!$canWrite) usleep(round(rand(0, 100)*1000)); - } while ((!$canWrite)and((microtime(TRUE)-$startTime) < 5)); - - //file was locked so now we can store information - if ($canWrite) { - fwrite($fp, $dataToSave); - flock($fp, LOCK_UN); - } - fclose($fp); - return true; - } else { - return false; - } -} - session_start(); include_once('../../includes/config.php'); include_once('../../includes/functions.php'); diff --git a/includes/hostapd.php b/includes/hostapd.php index 1465d333..1b4eccaa 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -461,6 +461,11 @@ function SaveHostAPDConfig($wpa_array, $enc_types, $modes, $interfaces, $status) // Check for Logging Checkbox $logEnable = 0; +<<<<<<< HEAD +======= + echo "SOMETHING ".$arrHostapdConf['LogEnable']; + echo 'logenable set:'.$_POST['logEnable']; +>>>>>>> 604b28130fd2e331a8c13b773239e0dcf0fa2fdf if($arrHostapdConf['LogEnable'] == 0) { if(isset($_POST['logEnable'])) { // Need code to enable logfile logging here diff --git a/installers/common.sh b/installers/common.sh index 73037edd..9fbb95da 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -200,6 +200,7 @@ function default_configuration() { done } + # Add a single entry to the sudoers file function sudo_add() { sudo bash -c "echo \"www-data ALL=(ALL) NOPASSWD:$1\" | (EDITOR=\"tee -a\" visudo)" \