#!/bin/bash # Check if UID/GID bit is set for any files in INSTALL_DIR # Report which langs will be installed by the package # Check if any RC scripts have been installed. If so warn user about adding them to rc-order # If info files have been installed # If perl modules will be installed # If mime db will be installed checkInstallDir() { # Find dirs that may be owned by some other user F="" for i in $(find $INSTALL_DIR -mindepth 1 -type d) do j=`echo $i | sed -e "s@$INSTALL_DIR@@"` k=`find $j -maxdepth 0 -not -user $TT_PKG_USER -not -user root -not -user $TT_PKG_USERNAME 2>/dev/null` if [ ! -z $k ] then F=" $F $k" fi done if [ ! -z "$F" ] then printMsg warning "Dirs that need to be owned $TT_PKG_USER: $F" fi # Find files that may be owned by some other user F="" for i in $(find $INSTALL_DIR -mindepth 1 -not -type d) do j=`echo $i | sed -e "s@$INSTALL_DIR@@"` k=`find $j -maxdepth 0 -not -user $TT_PKG_USER -not -user root -not -user $TT_PKG_USERNAME 2>/dev/null` if [ ! -z $k ] then F=" $F $k" fi done if [ ! -z "$F" ] then printMsg warning "Files that collide: $F" fi #F=`find $INSTALL_DIR/usr/share/locale $INSTALL_DIR/usr/share/man $INSTALL_DIR/usr/lib/X11/locale -maxdepth 1 -mindepth 1 -type d -not -name "man?" -printf " %f\n" 2>/dev/null | sort | uniq` #if [ ! -z "$F" ] #then #F=`echo $F | sed -e "s:\n::g"` #printMsg warning "Language Catalogs Installed: $F" #fi F=`find $INSTALL_DIR -perm +u+s -printf " %p" | sed -e "s:$INSTALL_DIR::g" | sort` if [ ! -z "$F" ] then printMsg warning "Files with UID Set:$F" fi F=`find $INSTALL_DIR -perm +g+s -printf " %p" | sed -e "s:$INSTALL_DIR::g" | sort` if [ ! -z "$F" ] then printMsg warning "Files with GID Set:$F" fi F=`find $INSTALL_DIR -name "libexec" -type d 2>/dev/null | sort` if [ ! -z "$F" ] then printMsg warning "Pkg needs to remove libexec dir" fi F=`find $INSTALL_DIR$TT_RC_DIR -name "*.rc" -printf " %f\n" 2>/dev/null | sort` if [ ! -z "$F" ] then F=`echo $F | sed -e "s:\n::g"` printMsg warning "RC Scripts installed: $F" fi if [ -d $INSTALL_DIR/usr/share/info ] then printMsg warning "Pkg installs info pages" fi if [ -d $INSTALL_DIR/usr/lib/perl-addons ] then printMsg warning "Pkg installs perl module" fi if [ -d $INSTALL_DIR/etc/gconf/schemas ] then printMsg warning "Pkg installs GConf Schemas" fi if [ -d $INSTALL_DIR/usr/share/mime ] then printMsg warning "Pkg installs mime db files" fi if [ -d $INSTALL_DIR/usr/share/fonts ] then printMsg warning "Pkg installs fonts" fi if [ -d $INSTALL_DIR/usr/share/icons ] then printMsg warning "Pkg installs icons" fi if [ -d $INSTALL_DIR/usr/lib/gtk-2.0/2.4.0/immodules ] then printMsg warning "Pkg installs GTK+ immodules" fi if [ -d $INSTALL_DIR/usr/lib/gtk-2.0/2.4.0/loaders ] then printMsg warning "Pkg installs GTK+ loaders" fi if [ -d $INSTALL_DIR/usr/share/omf ] then printMsg warning "Pkg installs Scollkeeper files" fi F=`find $INSTALL_DIR/var -name "libexec" -type d 2>/dev/null | sort` if [ ! -z "$F" ] then printMsg warning "Pkg needs to remove scrollkeeper dir" fi if [ "$TT_SYS_BIT" = "64" ] then F=`find $INSTALL_DIR -name "lib64" -type d 2>/dev/null | sort` if [ ! -z "$F" ] then printMsg warning "Pkg installed 64 bit libraries in lib64" fi fi }