| 1 | From 157524b7cb76c5044a27f4a9e373ee04a9da3c71 Mon Sep 17 00:00:00 2001
|
| 2 | From: Ahmad Draidi <[email protected]>
|
| 3 | Date: Tue, 9 Apr 2024 18:26:52 +0400
|
| 4 | Subject: [PATCH] Use arcan from privileged-programs if available
|
| 5 |
|
| 6 | ---
|
| 7 | distr/durden | 10 ++++++++--
|
| 8 | 1 file changed, 8 insertions(+), 2 deletions(-)
|
| 9 |
|
| 10 | diff --git a/distr/durden b/distr/durden
|
| 11 | index ab431ce..8672556 100755
|
| 12 | |
| 13 | |
| 14 | @@ -1,5 +1,11 @@
|
| 15 | #!/bin/sh
|
| 16 |
|
| 17 | +if [ -n "$(command -v /run/privileged/bin/arcan 2>/dev/null)" ]; then
|
| 18 | + ARCAN_CMD="/run/privileged/bin/arcan"
|
| 19 | +else
|
| 20 | + ARCAN_CMD="@ARCAN_STORE_PATH@"
|
| 21 | +fi
|
| 22 | +
|
| 23 | arcan_base=${HOME}/.arcan
|
| 24 | applname="$(basename $0)"
|
| 25 | distargs=""
|
| 26 | @@ -98,11 +104,11 @@ while true; do
|
| 27 | starttime=$(date +%s)
|
| 28 |
|
| 29 | if [ -d "${arcan_logpath}" ]; then
|
| 30 | - if arcan ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then
|
| 31 | + if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then
|
| 32 | exit
|
| 33 | fi
|
| 34 | else
|
| 35 | - if arcan ${distargs} -b "$applname" "$applname" "$@"; then
|
| 36 | + if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@"; then
|
| 37 | exit
|
| 38 | fi
|
| 39 | fi
|
| 40 | --
|
| 41 | 2.41.0
|
| 42 |
|