#!/bin/sh # # This is a modified script to update quickly a already installed system # but excludes the /etc directory. # to update /etc extract first the sources to /usr/src # and do first a mergemaster -p # then a mergemaster if [ "$( id -u )" != "0" ]; then echo "Sorry, this must be done as root." # exit 1 fi DESTDIR=/ # remove schg flags from files and dircetories SCHGDIRS="bin lib libexec sbin usr/bin usr/lib usr/libexec usr/sbin var/empty" [ "$( uname -m )" = "amd64" ] && SCHGDIRS="$SCHGDIRS usr/lib32" echo "You are about to extract the base distribution into ${DESTDIR:-/} - are you SURE" echo "" echo "*******************************************" echo " host: $(hostname) " echo "*******************************************" echo "" echo -n "you want to do this over your installed system (y/n)? " read ans if [ "$ans" = "y" ]; then echo "remove schg flag from" for DIR in ${SCHGDIRS}; do find ${DESTDIR:-/}${DIR}/ -flags schg -maxdepth 1 | xargs chflags -v noschg done echo "extract base ... ( exclude ./etc )" cat base.?? | tar --unlink -xpzf - --exclude ./etc -C ${DESTDIR:-/} fi