There was a discussion of this recently, and the conclusion was more or
less that doing this in an automated fashion is frought with danger,
since you don't know for sure what else besides system components the
user has put in the various directories.

I've been using the following combination of a bash function (that could
just as easily be its own script) and a script I call
after_installworld.

doinstall ()
{
    cd /usr && [ -d include-old ] && /bin/rm -r include-old;
    [ ! -e include-old ] && mv -i include include-old;
    /bin/rm -r /usr/share/man;
    cd /usr/src && touch installdate && make installworld
}


#!/bin/sh

PATH=/usr/bin:/bin
export PATH

for dir in /bin /lib /libexec /rescue /sbin \
        /usr/bin /usr/games /usr/lib /usr/libdata /usr/libexec /usr/sbin ; do
        for file in `find $dir \( -type f -o -type l \) -a \
                ! -newer /usr/src/installdate`; do
                case "${file}" in
                /usr/lib/compat/*|*/0ld/*|/usr/libdata/perl/*) ;;
                *)      echo ''
                        ls -lao ${file}
                        read -p "  *** Move ${file} to ${file%/*}/0ld? [n] " M
                        case ${M} in
                        [yY]*)  mkdir -p ${file%/*}/0ld
                                chflags 0 ${file} &&
                                mv -i ${file} ${file%/*}/0ld/
                                ;;
                        esac
                        ;;
                esac
        done
done

exit 0


This combination keeps things squeaky clean for me.

HTH,

Doug

-- 

    This .signature sanitized for your protection


_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to