aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-04-29 12:54:39 +0000
committermerakor <cem@ckyln.com>2020-04-29 12:54:39 +0000
commit8997f5677be91c6063633eaa7dd619a3a1eb3244 (patch)
tree838ec685cc326d794567728a2c1a21e7eae2119a
parent7fe719ab96cf539bcc4278ce83d8fa8982afbce9 (diff)
downloadcpt-8997f5677be91c6063633eaa7dd619a3a1eb3244.tar.gz
kiss: use '$0' to call itself with as_root function
FossilOrigin-Name: 901546c6c493ca53942ea4d3337799dbad007c3319bd3a12b2422451ad320c83
-rwxr-xr-xkiss4
1 files changed, 2 insertions, 2 deletions
diff --git a/kiss b/kiss
index a813b87..88dbb18 100755
--- 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
}
;;