diff options
author | merakor <cem@ckyln.com> | 2020-04-29 12:54:39 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-04-29 12:54:39 +0000 |
commit | 8997f5677be91c6063633eaa7dd619a3a1eb3244 (patch) | |
tree | 838ec685cc326d794567728a2c1a21e7eae2119a | |
parent | 7fe719ab96cf539bcc4278ce83d8fa8982afbce9 (diff) | |
download | cpt-8997f5677be91c6063633eaa7dd619a3a1eb3244.tar.gz |
kiss: use '$0' to call itself with as_root function
FossilOrigin-Name: 901546c6c493ca53942ea4d3337799dbad007c3319bd3a12b2422451ad320c83
-rwxr-xr-x | kiss | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } ;; |