Changeset 2944
- Timestamp:
- 10/30/08 06:49:28 (17 months ago)
- Location:
- pcbsd
- Files:
-
- 4 added
- 8 removed
- 2 modified
-
branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh (deleted)
-
branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/getUpdatesDir.sh (deleted)
-
branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh (modified) (2 diffs)
-
branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/rsync (deleted)
-
branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/wget (deleted)
-
branches/7.0/system-overlay/PCBSD/SystemUpdater/conf (added)
-
branches/7.0/system-overlay/PCBSD/SystemUpdater/conf/sysupdate.conf (added)
-
trunk/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh (deleted)
-
trunk/system-overlay/PCBSD/SystemUpdater/bin/getUpdatesDir.sh (deleted)
-
trunk/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh (modified) (2 diffs)
-
trunk/system-overlay/PCBSD/SystemUpdater/bin/rsync (deleted)
-
trunk/system-overlay/PCBSD/SystemUpdater/bin/wget (deleted)
-
trunk/system-overlay/PCBSD/SystemUpdater/conf (added)
-
trunk/system-overlay/PCBSD/SystemUpdater/conf/sysupdate.conf (added)
Legend:
- Unmodified
- Added
- Removed
-
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh
r1420 r2944 1 1 #!/bin/bash 2 # 3 # Requires $1 to be set to PC-BSD Version, and $2 to be patch .tgz location 4 ############################################################################ 5 6 # Check to make sure we have been given a version number 7 if [ -z "${1}" ] 8 then 9 exit 150 10 fi 2 11 3 12 # Set the program location … … 5 14 6 15 # Get the system version we are checking for updates to 7 SYSVER=" `pbreg get /PC-BSD/Version`" ; export SYSVER16 SYSVER="${1}" ; export SYSVER 8 17 9 18 # Check if we have an update folder for the version we are on 10 if [ -d "${PROGDIR}/system-updates/available/${SYSVER}" ]19 if [ ! -d "${PROGDIR}/system-updates/available/${SYSVER}" ] 11 20 then 12 13 # Make the installed directory for this version 14 if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ] 15 then 16 mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER} 17 fi 18 19 # CD to the patch directory for this version 20 cd ${PROGDIR}/system-updates/available/${SYSVER} 21 22 # Setup our variable, we have no patches so far 23 PATCHFOUND="0" 24 25 # Remove the tmp update file 26 rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null 27 28 # Now check which updates are available, and make a list of ones not installed 29 for i in `ls *.upd` 30 do 31 if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ] 32 then 33 PATCHFOUND="`expr ${PATCHFOUND} + 1`" 34 echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates 35 fi 36 done 37 38 # Check if we found any new patches 39 if [ "${PATCHFOUND}" = "0" ] 40 then 41 # No available updates 42 exit 150 43 else 44 # We have updates! 45 exit 0 46 fi 47 else 48 # Exit with code 150, - No updates available 49 exit 150 21 mkdir -p ${PROGDIR}/system-updates/available/${SYSVER} 50 22 fi 51 23 24 # If we have new update-data file, extract it 25 if [ ! -z "${2}" ] 26 then 27 cd ${PROGDIR}/system-updates/available/${SYSVER} 28 29 # Remove old .upd data files 30 rm *.upd 31 32 # Extract the patch data 33 tar xvzf ${2} >/dev/null 2>/dev/null 34 35 # Remove patchset data, done with it for now 36 rm ${2} 37 fi 38 39 40 # Make the installed directory for this version 41 if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ] 42 then 43 mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER} 44 fi 45 46 # CD to the patch directory for this version 47 cd ${PROGDIR}/system-updates/available/${SYSVER} 48 49 # Setup our variable, we have no patches so far 50 PATCHFOUND="0" 51 52 # Remove the tmp update file 53 rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null 54 55 # Now check which updates are available, and make a list of ones not installed 56 for i in `ls *.upd` 57 do 58 if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ] 59 then 60 PATCHFOUND="`expr ${PATCHFOUND} + 1`" 61 echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates 62 fi 63 done 64 65 # Check if we found any new patches 66 if [ "${PATCHFOUND}" = "0" ] 67 then 68 # No available updates 69 exit 150 70 else 71 # We have updates! 72 exit 0 73 fi -
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh
r1420 r2944 1 1 #!/bin/bash 2 # 3 # Requires $1 to be set to PC-BSD Version, and $2 to be patch .tgz location 4 ############################################################################ 5 6 # Check to make sure we have been given a version number 7 if [ -z "${1}" ] 8 then 9 exit 150 10 fi 2 11 3 12 # Set the program location … … 5 14 6 15 # Get the system version we are checking for updates to 7 SYSVER=" `pbreg get /PC-BSD/Version`" ; export SYSVER16 SYSVER="${1}" ; export SYSVER 8 17 9 18 # Check if we have an update folder for the version we are on 10 if [ -d "${PROGDIR}/system-updates/available/${SYSVER}" ]19 if [ ! -d "${PROGDIR}/system-updates/available/${SYSVER}" ] 11 20 then 12 13 # Make the installed directory for this version 14 if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ] 15 then 16 mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER} 17 fi 18 19 # CD to the patch directory for this version 20 cd ${PROGDIR}/system-updates/available/${SYSVER} 21 22 # Setup our variable, we have no patches so far 23 PATCHFOUND="0" 24 25 # Remove the tmp update file 26 rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null 27 28 # Now check which updates are available, and make a list of ones not installed 29 for i in `ls *.upd` 30 do 31 if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ] 32 then 33 PATCHFOUND="`expr ${PATCHFOUND} + 1`" 34 echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates 35 fi 36 done 37 38 # Check if we found any new patches 39 if [ "${PATCHFOUND}" = "0" ] 40 then 41 # No available updates 42 exit 150 43 else 44 # We have updates! 45 exit 0 46 fi 47 else 48 # Exit with code 150, - No updates available 49 exit 150 21 mkdir -p ${PROGDIR}/system-updates/available/${SYSVER} 50 22 fi 51 23 24 # If we have new update-data file, extract it 25 if [ ! -z "${2}" ] 26 then 27 cd ${PROGDIR}/system-updates/available/${SYSVER} 28 29 # Remove old .upd data files 30 rm *.upd 31 32 # Extract the patch data 33 tar xvzf ${2} >/dev/null 2>/dev/null 34 35 # Remove patchset data, done with it for now 36 rm ${2} 37 fi 38 39 40 # Make the installed directory for this version 41 if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ] 42 then 43 mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER} 44 fi 45 46 # CD to the patch directory for this version 47 cd ${PROGDIR}/system-updates/available/${SYSVER} 48 49 # Setup our variable, we have no patches so far 50 PATCHFOUND="0" 51 52 # Remove the tmp update file 53 rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null 54 55 # Now check which updates are available, and make a list of ones not installed 56 for i in `ls *.upd` 57 do 58 if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ] 59 then 60 PATCHFOUND="`expr ${PATCHFOUND} + 1`" 61 echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates 62 fi 63 done 64 65 # Check if we found any new patches 66 if [ "${PATCHFOUND}" = "0" ] 67 then 68 # No available updates 69 exit 150 70 else 71 # We have updates! 72 exit 0 73 fi
