From: Ian Kelling Date: Tue, 1 Oct 2024 00:50:03 +0000 (-0400) Subject: minor fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=08a48a2e1a30bd43f605263e1723a30174e92ea5;p=distro-setup minor fixes --- diff --git a/filesystem/usr/local/bin/umount-funcs b/filesystem/usr/local/bin/umount-funcs index 29f0ddf..5708a51 100644 --- a/filesystem/usr/local/bin/umount-funcs +++ b/filesystem/usr/local/bin/umount-funcs @@ -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 } diff --git a/ziva-backup-check b/filesystem/usr/local/bin/ziva-backup-check similarity index 99% rename from ziva-backup-check rename to filesystem/usr/local/bin/ziva-backup-check index 2a68af8..2fff73a 100755 --- a/ziva-backup-check +++ b/filesystem/usr/local/bin/ziva-backup-check @@ -20,11 +20,10 @@ # 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; } diff --git a/ziva-screen b/filesystem/usr/local/bin/ziva-screen similarity index 100% rename from ziva-screen rename to filesystem/usr/local/bin/ziva-screen diff --git a/machine_specific/frodo/filesystem/etc/cron.d/d_host b/machine_specific/frodo/filesystem/etc/cron.d/d_host index 2efa212..515cf55 100644 --- a/machine_specific/frodo/filesystem/etc/cron.d/d_host +++ b/machine_specific/frodo/filesystem/etc/cron.d/d_host @@ -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 diff --git a/path-add-function b/path-add-function index fb93787..251c561 100644 --- a/path-add-function +++ b/path-add-function @@ -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