aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpt-lib.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 2af31fb..73e483c 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -389,7 +389,7 @@ as_root() {
"$@"
case ${su##*/} in
- sudo|doas) "$su" -u "$user" -- env "$@" ;;
+ sls|sudo|doas) "$su" -u "$user" -- env "$@" ;;
su) su -c "env $* <&3" "$user" 3<&0 </dev/tty ;;
*) die "Invalid CPT_SU value: $su" ;;
esac
@@ -1867,7 +1867,9 @@ create_cache() {
# Figure out which 'sudo' command to use based on the user's choice or
# what is available on the system.
- su=${CPT_SU:-$(command -v sudo || command -v doas)} || su=su
+ su=${CPT_SU:-$(command -v sls ||
+ command -v sudo ||
+ command -v doas)} || su=su
# Store the date and time of script invocation to be used as the name
# of the log files the package manager creates uring builds.