various fixes
authorIan Kelling <ian@iankelling.org>
Wed, 17 Jul 2019 01:17:34 +0000 (21:17 -0400)
committerIan Kelling <ian@iankelling.org>
Wed, 17 Jul 2019 01:17:34 +0000 (21:17 -0400)
brc
distro-end
dynamic-ip-update
filesystem/etc/profile.d/environment.sh

diff --git a/brc b/brc
index 1c1f0f8ac8fb2b4ebfe3be8196b31e21692ccaa0..5f12a07f609f1720367a5e47e5e42a1b78d6a473 100644 (file)
--- a/brc
+++ b/brc
@@ -1276,6 +1276,20 @@ net-dev-info() {
 
 }
 
+nk() {
+  ser stop NetworkManager
+  ser stop dnsmasq
+  s resolvconf -d NetworkManager
+  ser start dnsmasq
+  s ifup br0
+}
+ngo() {
+  s ifdown br0
+  ser start NetworkManager
+  sleep 4
+  s nmtui-connect
+}
+
 nopanic() {
   sudo tee -a /var/log/exim4/paniclog-archive </var/log/exim4/paniclog; sudo truncate -s0 /var/log/exim4/paniclog
 }
@@ -1411,6 +1425,11 @@ r() {
 rbpipe() { rbt post -o --diff-filename=- "$@"; }
 rbp() { rbt post -o "$@"; }
 
+rebr() {
+  s ifdown br0
+  s ifup br0
+}
+
 resolvcat() {
   local f
   f=/etc/resolv.conf
@@ -1559,22 +1578,6 @@ srestart() {
     systemctl restart $service
   fi
 }
-stopnm() {
-  ser stop NetworkManager
-  ser stop dnsmasq
-  s resolvconf -d NetworkManager
-  ser start dnsmasq
-  s ifup br0
-}
-startnm() {
-  s ifdown br0
-  ser start NetworkManager
-  s nmtui-connect
-}
-rebr() {
-  s ifdown br0
-  s ifup br0
-}
 
 setini() { # set a value in a .ini style file
   key="$1" value="$2" section="$3" file="$4"
index 15ae5c2acd17085444d8892c4550e963b0bb990b..b883fec1ce82becebcc92b6963985338508ac3d8 100755 (executable)
@@ -15,7 +15,8 @@
 
 ### setup
 source /a/bin/errhandle/err
-src="${BASH_SOURCE%/*}"
+src="$(readlink -f -- "$BASH_SOURCE")"; src=${src%/*} # directory of this file
+
 source $src/pkgs
 
 set -x
@@ -48,7 +49,7 @@ if isdeb; then
 fi
 
 # avoid ptompts!
-debconf-set-selections <<EOF
+debconf-set-selections <<EOF
 popularity-contest popularity-contest/participate boolean true
 EOF
 
@@ -1675,6 +1676,21 @@ esac
 
 /a/bin/buildscripts/pithosfly
 
+
+# based on guix manual instructions, also added code to profile
+pi nscd
+if ! type -p guix >/dev/null; then
+  cd $(mktemp -d)
+  wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
+  # added some stuff to envonment.sh for profile based on
+  # manual instructions
+  # wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | gpg --import -
+  # echo is to get past prompt
+  echo | sudo -E HOME=/home/iank bash guix-install.sh
+  guix install glibc-utf8-locales
+  guix package --install guile
+fi
+
 #### tor
 case $distro in
   # based on
index 185eef2ec0adbd1a54e14fa73465ea9bbb314eb9..3ece5b3fa1cb541b4a343d178ca1f51c884319e3 100755 (executable)
@@ -54,6 +54,7 @@ EOF
 if $up4; then
   cat >>$f <<EOF
 update delete b8.nz. A
+update delete wrt.b8.nz. A
 update add b8.nz. 300 A $ip4
 update add wrt.b8.nz. 300 A $ip4
 EOF
index d91cde11069208606a797a4c76078c6ee812685c..1d49f6a3f55a671e24039a901f5b060d785c5c83 100644 (file)
@@ -1,14 +1,23 @@
 if [ -f $HOME/path_add-function ]; then
-    . $HOME/path_add-function
-    path_add /usr/sbin /usr/local/sbin /sbin /a/exe /a/opt/bin
-    path_add --end $HOME/.cabal/bin
+  . $HOME/path_add-function
+  path_add /usr/sbin /usr/local/sbin /sbin /a/exe /a/opt/bin
+  path_add --end $HOME/.cabal/bin
+
+  if [ -r /etc/alternatives/java_sdk ]; then
+    export JAVA_HOME=/etc/alternatives/java_sdk
+    path_add /etc/alternatives/java_sdk
+  fi
+
+  export GUIX_PROFILE=/root/.config/guix/current
+  if [[ -e $GUIX_PROFILE/etc/profile ]]; then
+    source $GUIX_PROFILE/etc/profile
+  fi
+  path_add $HOME/.guix-profile/bin
+  export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
 
-    if [ -r /etc/alternatives/java_sdk ]; then
-        export JAVA_HOME=/etc/alternatives/java_sdk
-        path_add /etc/alternatives/java_sdk
-    fi
 fi
 
+
 export EDITOR="emacsclient"
 # this makes emacsclient file/-c start a server instance if none is running,
 # instead of some alternate editor logic
@@ -40,20 +49,20 @@ export TZ=:/etc/localtime
 # I also added the bit about xmessaging the stderr,
 # because I'd like to know if the command fails
 if [ -f /etc/fedora-release ]; then
-    : ${GNUPGHOME=$HOME/.gnupg}
+  : ${GNUPGHOME=$HOME/.gnupg}
 
-    GPGAGENT=/usr/bin/gpg-agent
-    PID_FILE="$GNUPGHOME/gpg-agent-info-$(hostname)"
+  GPGAGENT=/usr/bin/gpg-agent
+  PID_FILE="$GNUPGHOME/gpg-agent-info-$(hostname)"
 
-    if ! $GPGAGENT 2>/dev/null; then
-        temp="$(mktemp)"
-        eval "$($GPGAGENT --homedir /p/do-not-delete --daemon --sh --write-env-file=$PID_FILE 2>$temp)"
-        temperr="$(<"$temp")"
-        [ -n "$temperr" ] && xmessage "gpg-agent stderr: $temperr"
-    elif [ -r "$PID_FILE" ]; then
-        . "$PID_FILE"
-        export GPG_AGENT_INFO
-    fi
+  if ! $GPGAGENT 2>/dev/null; then
+    temp="$(mktemp)"
+    eval "$($GPGAGENT --homedir /p/do-not-delete --daemon --sh --write-env-file=$PID_FILE 2>$temp)"
+    temperr="$(<"$temp")"
+    [ -n "$temperr" ] && xmessage "gpg-agent stderr: $temperr"
+  elif [ -r "$PID_FILE" ]; then
+    . "$PID_FILE"
+    export GPG_AGENT_INFO
+  fi
 fi
 
 # background: