rework the check on root:root perms for installing packages; still may need to add a new config file variable, such as 'CHECKPERMS' in order to turn this off since I know of a few folks that purposefully change the perms of their built packages and it might get annoying to have to always answer yes. With this config file variable, they can turn the perm checking off.

This commit is contained in:
chess.griffin 2009-02-12 18:03:06 +00:00
parent 4968335fc7
commit ef217c01fa

View File

@ -1704,9 +1704,24 @@ install_package () {
return 0
fi
if [[ ! "$OWNER" == "root" && ! "$GROUP" == "root" ]]; then
crunch_fmt "The file is not set with root:root permissions. \
Installation will not continue."
return 0
crunch_fmt "WARNING: The file $INSTPKG is not set with root:root \
permissions! Do you want to proceed? Here is the \
output of ls -l:"
echo
ls -l $OUTPUT/$INSTPKG
echo
echo "Press (Y)es to proceed or (N)o to abort."
read ANS
case $ANS in
y* | Y* ) echo "Proceeding..."
;;
n* | N* ) echo "Aborting..."
return 0
;;
* ) echo "Unknown response."
break
;;
esac
fi
if [ "$INSTALLPKGS" = "1" ]; then
upgradepkg --reinstall --install-new $OUTPUT/*