minor fixes
authorIan Kelling <ian@iankelling.org>
Tue, 1 Oct 2024 00:50:03 +0000 (20:50 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 1 Oct 2024 00:50:03 +0000 (20:50 -0400)
filesystem/usr/local/bin/umount-funcs
filesystem/usr/local/bin/ziva-backup-check [moved from ziva-backup-check with 99% similarity]
filesystem/usr/local/bin/ziva-screen [moved from ziva-screen with 100% similarity]
machine_specific/frodo/filesystem/etc/cron.d/d_host
path-add-function

index 29f0ddf79e52de4cb9635938b7d844e76938380a..5708a51a5b66d34eec983b9ed164f814eb86a6ee 100644 (file)
@@ -64,6 +64,16 @@ kill-dir() {
     sig=${sigs[$i]}
     pid-check
     echo kill-dir $sig
+    first_pid=true
+    for pid in $pids; do
+      if $first_pid; then
+        ps_pids=$pid
+        first_pid=false
+      else
+        ps_pids+=,$pid
+      fi
+    done
+    pd -f -p $ps_pids
     kill -$sig $pids
   done
 }
similarity index 99%
rename from ziva-backup-check
rename to filesystem/usr/local/bin/ziva-backup-check
index 2a68af87dfb1769f93b060eeb6b235d342a97e40..2fff73aa51edeef5dda9bf08b964074eff7c98f7 100755 (executable)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
 
 source /a/bin/bash-bear-trap/bash-bear
 
-[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
-
 pre="${0##*/}:"
 err() { echo "[$(date +'%Y-%m-%d %H:%M:%S%z')]: $pre: $*" >&2; }
 
index 2efa2124ecb1b4b4b7efc30d1b274edbed4e2fe5..515cf55b2010cca7bd7a550b23604d90c1301fa0 100644 (file)
@@ -1,5 +1,5 @@
 SHELL=/bin/bash
-PATH=/usr/bin:/bin:/usr/local/bin:/a/exe:/a/bin/fai
+PATH=/usr/bin:/bin:/usr/local/bin:/a/bin/fai:/usr/local/sbin:/usr/sbin
 MAILTO=root
 
 ## weekdays
index fb93787233c9d52cef490875846b02a32db0aef1..251c56139f7b098df16a6f28334e6e24d01b6da5 100644 (file)
@@ -60,11 +60,11 @@ path-add() {
   IFS=:
   # build up the path without the components we want to add
   for y in $PATH; do
+    found=false
     for x in "$@"; do
       if [ "$x" = "$y" ]; then
         found=true
-      else
-        found=false
+        break
       fi
     done
     if ! $found; then