[PC-BSD Commits] r2944 - in pcbsd: branches/7.0/system-overlay/PCBSD/SystemUpdater branches/7.0/system-overlay/PCBSD/SystemUpdater/bin branches/7.0/system-overlay/PCBSD/SystemUpdater/conf trunk/system-overlay/PCBSD/SystemUpdater trunk/system-overlay/PCBSD/SystemUpdater/bin trunk/system-overlay/PCBSD/SystemUpdater/conf
svn at pcbsd.org
svn at pcbsd.org
Thu Oct 30 05:49:29 PST 2008
Author: kris
Date: 2008-10-30 06:49:28 -0700 (Thu, 30 Oct 2008)
New Revision: 2944
Added:
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/conf/
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/conf/sysupdate.conf
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/conf/
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/conf/sysupdate.conf
Removed:
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/getUpdatesDir.sh
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/rsync
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/wget
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/getUpdatesDir.sh
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/rsync
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/wget
Modified:
pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh
Log:
Updated the system-overlay backend for the new SystemUpdater program. Removed old scripts / binares we no longer need, and added a config file
Modified: pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh
===================================================================
--- pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh 2008-10-29 20:55:27 UTC (rev 2943)
+++ pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh 2008-10-30 13:49:28 UTC (rev 2944)
@@ -1,51 +1,73 @@
#!/bin/bash
+#
+# Requires $1 to be set to PC-BSD Version, and $2 to be patch .tgz location
+############################################################################
+# Check to make sure we have been given a version number
+if [ -z "${1}" ]
+then
+ exit 150
+fi
+
# Set the program location
PROGDIR="/PCBSD/SystemUpdater" ; export PROGDIR
# Get the system version we are checking for updates to
-SYSVER="`pbreg get /PC-BSD/Version`" ; export SYSVER
+SYSVER="${1}" ; export SYSVER
# Check if we have an update folder for the version we are on
-if [ -d "${PROGDIR}/system-updates/available/${SYSVER}" ]
+if [ ! -d "${PROGDIR}/system-updates/available/${SYSVER}" ]
then
+ mkdir -p ${PROGDIR}/system-updates/available/${SYSVER}
+fi
- # Make the installed directory for this version
- if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ]
- then
- mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER}
- fi
+# If we have new update-data file, extract it
+if [ ! -z "${2}" ]
+then
+ cd ${PROGDIR}/system-updates/available/${SYSVER}
- # CD to the patch directory for this version
- cd ${PROGDIR}/system-updates/available/${SYSVER}
+ # Remove old .upd data files
+ rm *.upd
- # Setup our variable, we have no patches so far
- PATCHFOUND="0"
+ # Extract the patch data
+ tar xvzf ${2} >/dev/null 2>/dev/null
- # Remove the tmp update file
- rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null
+ # Remove patchset data, done with it for now
+ rm ${2}
+fi
- # Now check which updates are available, and make a list of ones not installed
- for i in `ls *.upd`
- do
- if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ]
- then
- PATCHFOUND="`expr ${PATCHFOUND} + 1`"
- echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates
- fi
- done
- # Check if we found any new patches
- if [ "${PATCHFOUND}" = "0" ]
- then
- # No available updates
- exit 150
- else
- # We have updates!
- exit 0
- fi
+# Make the installed directory for this version
+if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ]
+then
+ mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER}
+fi
+
+# CD to the patch directory for this version
+cd ${PROGDIR}/system-updates/available/${SYSVER}
+
+# Setup our variable, we have no patches so far
+PATCHFOUND="0"
+
+# Remove the tmp update file
+rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null
+
+# Now check which updates are available, and make a list of ones not installed
+for i in `ls *.upd`
+do
+ if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ]
+ then
+ PATCHFOUND="`expr ${PATCHFOUND} + 1`"
+ echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates
+ fi
+done
+
+# Check if we found any new patches
+if [ "${PATCHFOUND}" = "0" ]
+then
+ # No available updates
+ exit 150
else
- # Exit with code 150, - No updates available
- exit 150
+ # We have updates!
+ exit 0
fi
-
Property changes on: pcbsd/branches/7.0/system-overlay/PCBSD/SystemUpdater/conf/sysupdate.conf
___________________________________________________________________
Added: svn:executable
+ *
Modified: pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh 2008-10-29 20:55:27 UTC (rev 2943)
+++ pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/readSysUpdates.sh 2008-10-30 13:49:28 UTC (rev 2944)
@@ -1,51 +1,73 @@
#!/bin/bash
+#
+# Requires $1 to be set to PC-BSD Version, and $2 to be patch .tgz location
+############################################################################
+# Check to make sure we have been given a version number
+if [ -z "${1}" ]
+then
+ exit 150
+fi
+
# Set the program location
PROGDIR="/PCBSD/SystemUpdater" ; export PROGDIR
# Get the system version we are checking for updates to
-SYSVER="`pbreg get /PC-BSD/Version`" ; export SYSVER
+SYSVER="${1}" ; export SYSVER
# Check if we have an update folder for the version we are on
-if [ -d "${PROGDIR}/system-updates/available/${SYSVER}" ]
+if [ ! -d "${PROGDIR}/system-updates/available/${SYSVER}" ]
then
+ mkdir -p ${PROGDIR}/system-updates/available/${SYSVER}
+fi
- # Make the installed directory for this version
- if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ]
- then
- mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER}
- fi
+# If we have new update-data file, extract it
+if [ ! -z "${2}" ]
+then
+ cd ${PROGDIR}/system-updates/available/${SYSVER}
- # CD to the patch directory for this version
- cd ${PROGDIR}/system-updates/available/${SYSVER}
+ # Remove old .upd data files
+ rm *.upd
- # Setup our variable, we have no patches so far
- PATCHFOUND="0"
+ # Extract the patch data
+ tar xvzf ${2} >/dev/null 2>/dev/null
- # Remove the tmp update file
- rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null
+ # Remove patchset data, done with it for now
+ rm ${2}
+fi
- # Now check which updates are available, and make a list of ones not installed
- for i in `ls *.upd`
- do
- if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ]
- then
- PATCHFOUND="`expr ${PATCHFOUND} + 1`"
- echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates
- fi
- done
- # Check if we found any new patches
- if [ "${PATCHFOUND}" = "0" ]
- then
- # No available updates
- exit 150
- else
- # We have updates!
- exit 0
- fi
+# Make the installed directory for this version
+if [ ! -d "${PROGDIR}/system-updates/installed/${SYSVER}" ]
+then
+ mkdir -p ${PROGDIR}/system-updates/installed/${SYSVER}
+fi
+
+# CD to the patch directory for this version
+cd ${PROGDIR}/system-updates/available/${SYSVER}
+
+# Setup our variable, we have no patches so far
+PATCHFOUND="0"
+
+# Remove the tmp update file
+rm /tmp/.pcbsdavailupdates >/dev/null 2>/dev/null
+
+# Now check which updates are available, and make a list of ones not installed
+for i in `ls *.upd`
+do
+ if [ ! -e "${PROGDIR}/system-updates/installed/${SYSVER}/${i}" ]
+ then
+ PATCHFOUND="`expr ${PATCHFOUND} + 1`"
+ echo "PATCH: ${SYSVER}/${i}" >> /tmp/.pcbsdavailupdates
+ fi
+done
+
+# Check if we found any new patches
+if [ "${PATCHFOUND}" = "0" ]
+then
+ # No available updates
+ exit 150
else
- # Exit with code 150, - No updates available
- exit 150
+ # We have updates!
+ exit 0
fi
-
Property changes on: pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/conf/sysupdate.conf
___________________________________________________________________
Added: svn:executable
+ *
More information about the Commits
mailing list