fixes and new bashrc func
authorIan Kelling <ian@iankelling.org>
Mon, 15 May 2017 04:25:40 +0000 (21:25 -0700)
committerIan Kelling <ian@iankelling.org>
Mon, 15 May 2017 04:25:40 +0000 (21:25 -0700)
.Xresources
brc
filesystem/etc/apt/detect-http-proxy

index 735f42d9de9af302d34b446607771ac1da5be406..9cddbd9224c8d979d53b91790a30ff6b48844ff4 100644 (file)
@@ -1,5 +1,5 @@
 Xft.autohint: 0
-Xft.lcdfilter: lcddefaault
+Xft.lcdfilter: lcddefault
 Xft.hintstyle: hintfull
 Xft.hinting: 1
 Xft.antialias: 1
diff --git a/brc b/brc
index 8e0facb52d8359f589da973ee946b69c5ae4d4f3..2d3f198bf2be066363e82d1469a1bdc8c883e79b 100644 (file)
--- a/brc
+++ b/brc
@@ -855,7 +855,15 @@ else
     }
 fi
 
+net-dev-info() {
+    e "lspci -nnk|gr -iA2 net"
+    lspci -nnk|gr -iA2 net
+    hr
+    e "s lshw -C network"
+    hr
+    s lshw -C network
 
+}
 
 istext() {
     grep -Il "" "$@" &>/dev/null
index a6d1d6fb77fa00b08ca1a7286fa40fcb9e9f4253..1cfdaf978b878dd6f76aa2e94c371a8fcfb902db 100755 (executable)
@@ -11,6 +11,10 @@ proxy_host=faiserver
 proxy_port=3142
 proxy_url=http://$proxy_host:$proxy_port/
 f=/tmp/apt_proxy_fail
+if [[ ! -w /tmp ]]; then
+    echo DIRECT
+    exit 0
+fi
 if [[ -r $f ]]; then
     if  (( $(( $(date +%s) - $(stat -c %Y $f ) )) < 60*10 )); then
         echo DIRECT
@@ -21,7 +25,7 @@ if [[ -r $f ]]; then
         fi
     fi
 fi
-if getent hosts $proxy_host && nc -z $proxy_host $proxy_port &>/dev/null; then
+if getent hosts $proxy_host &>/dev/null && timeout 1 nc -z $proxy_host $proxy_port &>/dev/null; then
     echo $proxy_url
 else
     if [[ ! -e $f || -w $f ]]; then