Update FreeBSD and Ports with portmaster

Recent talks on FreeBSD-Ports lists have been about whether portupgrade should be shown the door, portmaster seems to be the new way to go.


I still quite like portupgrade for some reasons but I would rather play it safe and jump on to portmaster before portupgrade sinks. In an old post I gave an example shell script that would run and bunch of stuff to update FreeBSD, in that script I used portupgade, this is the revised script using portmaster.

First make sure you have the following installed



echo "Starting updates: `date`" | tee -a ${LOG_FILE}
echo "***"
echo "*** Checking for FreeBSD patches..."
echo "***"
/usr/sbin/freebsd-update fetch | tee -a ${LOG_FILE}
/usr/sbin/freebsd-update install | tee -a ${LOG_FILE}

echo "***"
echo "*** Updating ports tree..."
echo "***"
/usr/sbin/portsnap fetch update | tee -a ${LOG_FILE}

echo "***"
echo "*** Looking for ports to update..."
echo "***"
/usr/local/sbin/portmaster -a --no-confirm | tee -a ${LOG_FILE}

echo "***"
echo "*** Checking installed ports for known security problems..."
echo "***"
/usr/local/sbin/portaudit -Fva | tee -a ${LOG_FILE}
echo "Finished updates: `date`" | tee -a ${LOG_FILE}

You may also like...