Move config files to files directory
It looks nicer. Other changes btw: * Removes duplicated logcats from GuardedProcess; * local_port is moved to command line options since that's not sensitive; * pdnsd uses cache dir; * Refinements to Utils.
This commit is contained in:
@@ -25,6 +25,7 @@ import java.io.File
|
||||
import eu.chainfire.libsuperuser.Shell
|
||||
|
||||
import scala.collection.JavaConverters._
|
||||
import scala.io.Source
|
||||
|
||||
/**
|
||||
* @author Mygod
|
||||
@@ -45,7 +46,7 @@ object TcpFastOpen {
|
||||
|
||||
def sendEnabled: Boolean = {
|
||||
val file = new File("/proc/sys/net/ipv4/tcp_fastopen")
|
||||
file.canRead && (Utils.readAllLines(file).toInt & 1) > 0
|
||||
file.canRead && (Source.fromFile(file).mkString.toInt & 1) > 0
|
||||
}
|
||||
|
||||
def enabled(value: Boolean): String = if (sendEnabled != value) {
|
||||
|
||||
Reference in New Issue
Block a user