Changeset 08a3270


Ignore:
Timestamp:
05/09/14 08:22:47 (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
eaea8ff
Parents:
221e4ca
Message:

Add pc-updatemanager -j <jail> syncconf command for AppCafe? to use

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-updatemanager/pc-updatemanager

    r12db463d r08a3270  
    8484  pkgcheck              - Check for updates to packages 
    8585  pkgupdate             - Install packages updates 
     86  syncconf              - Update jails pkgng config to match system 
     87  -j <jail>             - Operate on the jail specified 
    8688"        
    8789 
     
    966968} 
    967969 
     970sync_pkgconf() { 
     971  if [ -z "$INJAIL" ] ; then 
     972     exit_err "Usage: pc-updatemanager -j <jail> syncconf" 
     973  fi 
     974 
     975  # Need to update pkgng config in the jail to match systems 
     976  jDir="`jls | grep " $INJAIL " | awk '{print $4}'`" 
     977  if [ ! -d "$jDir/usr/local/etc/pkg/repos" ] ; then 
     978     mkdir -p ${jDir}/usr/local/etc/pkg/repos 
     979  fi 
     980  cp /usr/local/etc/pkg/repos/pcbsd.conf ${jDir}/usr/local/etc/pkg/repos/ 
     981 
     982} 
     983 
    968984checkup_pkgs() { 
    969985 
    970986  # Update the repo DB 
    971987  rc_halt "${PKG_CMD} update" 
    972  
    973   # See if we need to update the jails pkgng config file 
    974   if [ -n "$INJAIL" -a "$1" = "-uppkgconfig" ] ; then 
    975      # Need to update pkgng config in the jail to match systems 
    976      jDir="`jls | grep " $INJAIL " | awk '{print $4}'`" 
    977      if [ ! -d "$jDir/usr/local/etc/pkg/repos" ] ; then 
    978         mkdir -p ${jDir}/usr/local/etc/pkg/repos 
    979      fi 
    980      cp /usr/local/etc/pkg/repos/pcbsd.conf ${jDir}/usr/local/etc/pkg/repos/ 
    981   fi 
    982988 
    983989  ${PKG_CMD} ${PKG_FLAG} upgrade -n >/tmp/.pkgData.$$ 
     
    11231129        chbranch) get_update_file 
    11241130                  do_branch "${2}" ; break ;; 
    1125         pkgcheck) shift ; checkup_pkgs "$1" ; break ;; 
     1131        pkgcheck) checkup_pkgs ; break ;; 
     1132        syncconf) sync_pkgconf ; break ;; 
    11261133       pkgupdate) update_pkgs "$2" ; break ;; 
    11271134finish-major-update) finish_major_fbsd_update ; break ;; 
Note: See TracChangeset for help on using the changeset viewer.