fixes
[distro-setup] / brc2
diff --git a/brc2 b/brc2
index c233c9288354125d0d679f04deee6ee862666188..486bd25eae4f02c74c7d2fbe62d00c49b645186a 100644 (file)
--- a/brc2
+++ b/brc2
@@ -12,6 +12,8 @@ source /a/bin/distro-setup/path-add-function
 path-add /a/exe
 # add this with absolute paths as needed for better security
 #path-add --end /path/to/node_modules/.bin
+## for yarn, etc
+#path-add --end /usr/lib/node_modules/corepack/shims/
 
 # pip3 --user things go here:
 path-add --end ~/.local/bin
@@ -1647,18 +1649,24 @@ enn() {
 
 sdnbash() { # systemd namespace bash
   local unit=$1
-  m sudo nsenter -t $(systemctl show --property MainPID --value $unit') -n -m sudo -u $USER -i bash
+  m sudo nsenter -t $(systemctl show --property MainPID --value $unit) -n -m sudo -u $USER -i bash
 }
 
 mailnnbash() {
-  m sudo nsenter -t $(systemctl show --property MainPID --value mailnn') -n -m sudo -u $USER -i bash
+  m sudo nsenter -t $(systemctl show --property MainPID --value mailnn) -n -m sudo -u $USER -i bash
 }
 
 mailvpnbash() {
   m sudo nsenter -t $(pgrep -f "/usr/sbin/openvpn .* --config /etc/openvpn/.*mail.conf") -n -m sudo -u $USER -i bash
 }
 eximbash() {
-  m sudo nsenter -t $(pgrep -f "/usr/sbin/exim4 -bd -q30m -C /etc/exim4/my.conf"|h1) -n -m sudo -u $USER -i bash
+  local pid
+  pid=$(pgrep -f "/usr/sbin/exim4 -bd -q30m -C /etc/exim4/my.conf"|h1)
+  if [[ ! $pid ]]; then
+    echo "eximbash: failed to find exim pid. systemctl -n 30 status exim4:"
+    systemctl status exim4
+  fi
+  m sudo nsenter -t $pid -n -m
 }
 spamnn() {
   local spamdpid
@@ -1741,7 +1749,7 @@ vpn() {
   sudo systemd-tty-ask-password-agent
 }
 
-ufix() {
+fixu() {
   ls -lad /run/user/1000
   s chmod 700 /run/user/1000; s chown iank.iank /run/user/1000
 }