commit 446137c67442a4d6de45305136074a744fc20a01
parent 1f4bce57257a245215d8f9b020e5cd74d8959462
Author: Cem Keylan <cem@ckyln.com>
Date: Wed, 29 Apr 2020 15:54:40 +0300
kiss: use '$0' to call itself with as_root function
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kiss b/kiss
@@ -1297,7 +1297,7 @@ args() {
# Rerun the script with 'su' if the user isn't root.
# Cheeky but 'su' can't be used on shell functions themselves.
[ -z "$1" ] || [ "$uid" = 0 ] || {
- as_root kiss "$action" "$@"
+ as_root "$0" "$action" "$@"
return
}
;;
@@ -1306,7 +1306,7 @@ args() {
# Rerun the script with 'su' if the user isn't root.
# Cheeky but 'su' can't be used on shell functions themselves.
[ "$uid" = 0 ] || {
- KISS_FORCE="$KISS_FORCE" as_root kiss "$action" "$@"
+ KISS_FORCE="$KISS_FORCE" as_root "$0" "$action" "$@"
return
}
;;