Skip to contentSkip to conversation

wg-quick: use SUDO variable for a different sudo implementation like doas

PATCH New fossdd 1 participant 1 message May 21, 2025

lore
Share & tools
lore

fossdd

author
#0 lore raw

PATCH 1/1 wg-quick: use SUDO variable for a different sudo implementation like doas

---
 src/wg-quick/linux.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/wg-quick/linux.bash +1 -1
index 4193ce5..7795c0b 100755
@@ -82,7 +82,7 @@ read_bool() {
 }
 
 auto_su() {
-	[[ $UID == 0 ]] || exec sudo -p "$PROGRAM must be run as root. Please enter the password for %u to continue: " -- "$BASH" -- "$SELF" "${ARGS[@]}"
+	[[ $UID == 0 ]] || exec "${SUDO:-sudo}" "$BASH" -- "$SELF" "${ARGS[@]}"
 }
 
 add_if() {

base-commit: 13f4ac4cb74b5a833fa7f825ba785b1e5774e84f

Signature · 1 line
2.47.1