Add root constraint to libexec/portzap/portzap-install
This commit is contained in:
parent
2ab35924c8
commit
b688aa3f78
2 changed files with 4 additions and 1 deletions
|
@ -60,7 +60,6 @@ case $1 in
|
||||||
doas -u _portzap "${libexec}"/portzap-erase "${gitdir}" "${installdir}"
|
doas -u _portzap "${libexec}"/portzap-erase "${gitdir}" "${installdir}"
|
||||||
;;
|
;;
|
||||||
"install")
|
"install")
|
||||||
require_root
|
|
||||||
require_dependency "git doas"
|
require_dependency "git doas"
|
||||||
"${libexec}"/portzap-install "${gitdir}" "${installdir}" "${revision}"
|
"${libexec}"/portzap-install "${gitdir}" "${installdir}" "${revision}"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -57,6 +57,10 @@ run_install()
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
echo "[-] This command must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
set -x
|
set -x
|
||||||
umask u=rwX,g=rwX,o=
|
umask u=rwX,g=rwX,o=
|
||||||
cd "${gitdir}"
|
cd "${gitdir}"
|
||||||
|
|
Loading…
Reference in a new issue