diff options
Diffstat (limited to 'src/cpt-lib.in')
-rw-r--r-- | src/cpt-lib.in | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 4176d93..0578d8b 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -423,7 +423,11 @@ as_root() { "$@" case ${su##*/} in - sls|sudo|doas) "$su" -u "$user" -- env "$@" ;; + sls) + warn "'sls' is deprecated, use 'ssu' instead." + "$su" -u "$user" -- env "$@" + ;; + ssu|sudo|doas) "$su" -u "$user" -- env "$@" ;; su) su -c "env $* <&3" "$user" 3<&0 </dev/tty ;; *) die "Invalid CPT_SU value: $su" ;; esac @@ -1979,9 +1983,10 @@ 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 sls || + su=${CPT_SU:-$(command -v ssu || + command -v doas || command -v sudo || - command -v doas)} || su=su + command -v sls)} || 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. |