Changeset 374 for freebsd-mgnt
- Timestamp:
- Apr 29, 2012, 12:56:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd-mgnt/update-via-portmaster.sh
r373 r374 25 25 portsnap fetch update || exit 1 26 26 27 # Make sure the internal database is consistent 28 pkgdb -Fa || exit 1 27 # Find out which daemons to stop before the update 28 update_list=`pkg_version -o -L= | xargs -n1 pkg_info -qO` 29 30 if [ -z "$update_list" ]; then 31 echo "Everything is up2date" 32 exit 0 33 fi 34 35 # Find the rc.d/* entries affected 36 for pkg in $update_list; do 37 rc_d="$rc_d `pkg_info -qL $pkg $(pkg_info -qR $pkg) | grep -F '/rc.d/'`" 38 done 39 rc_d="`echo $rc_d | xargs -n1 | sort -u`" 40 41 # Stop the daemons affected 42 for rc in $rc_d; do 43 $rc stop 44 done 29 45 30 46 # Install via portmaster 31 47 portmaster -adG 48 49 # Just to be sure try to start all port daemons again (this will make sure the 50 # already updated ones are also started nicely again). 51 for rc in /usr/local/etc/rc.d/*; do 52 $rc restart 53 done
Note:
See TracChangeset
for help on using the changeset viewer.