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 return 0
fi fi
if [[ ! "$OWNER" == "root" && ! "$GROUP" == "root" ]]; then if [[ ! "$OWNER" == "root" && ! "$GROUP" == "root" ]]; then
crunch_fmt "The file is not set with root:root permissions. \ crunch_fmt "WARNING: The file $INSTPKG is not set with root:root \
Installation will not continue." 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 return 0
;;
* ) echo "Unknown response."
break
;;
esac
fi fi
if [ "$INSTALLPKGS" = "1" ]; then if [ "$INSTALLPKGS" = "1" ]; then
upgradepkg --reinstall --install-new $OUTPUT/* upgradepkg --reinstall --install-new $OUTPUT/*