[PC-BSD Commits] r19635 - in pcbsd: branches/9.1/src-sh/warden/scripts/backend current/src-sh/warden/scripts/backend

svn at pcbsd.org svn at pcbsd.org
Wed Oct 10 10:56:03 PDT 2012


Author: kris
Date: 2012-10-10 17:56:03 +0000 (Wed, 10 Oct 2012)
New Revision: 19635

Modified:
   pcbsd/branches/9.1/src-sh/warden/scripts/backend/checkupdates.sh
   pcbsd/current/src-sh/warden/scripts/backend/checkupdates.sh
Log:

Small fix to update checking in the warden, skip linux jails by default
and warn if the user tries it anyway



Modified: pcbsd/branches/9.1/src-sh/warden/scripts/backend/checkupdates.sh
===================================================================
--- pcbsd/branches/9.1/src-sh/warden/scripts/backend/checkupdates.sh	2012-10-10 17:20:31 UTC (rev 19634)
+++ pcbsd/branches/9.1/src-sh/warden/scripts/backend/checkupdates.sh	2012-10-10 17:56:03 UTC (rev 19635)
@@ -29,6 +29,7 @@
   exit 5
 fi
 
+
 # End of error checking, now start update checking
 #####################################################################
 
@@ -38,17 +39,27 @@
   for i in `ls -d .*.meta`
   do
     if [ ! -e "${i}/ip" ] ; then continue ; fi
-    jIP="`cat ${i}/ip`"
-    echo "Checking for jail updates to ${jIP}"
+    IP="`cat ${i}/ip`"
+    set_warden_metadir
+    if [ -e "${JMETADIR}/linuxjail" ] ; then continue; fi
+
+    echo "Checking for jail updates to ${IP}"
     echo "################################################"
  
     # Check for meta-pkg updates
-    pc-metapkgmanager --chroot ${JDIR}/${jIP} checkup
+    pc-metapkgmanager --chroot ${JDIR}/${IP} checkup
 
     # Check for system-updates
-    chroot ${JDIR}/${jIP} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch'
+    chroot ${JDIR}/${IP} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch'
   done
 else
+  set_warden_metadir
+  
+  if [ -e "${JMETADIR}/linuxjail" ] ; then
+    echo "ERROR: Cannot check for updates to Linux Jails.. Please use any included Linux utilities for your disto."
+    exit 5
+  fi
+
    echo "Checking for jail updates to ${IP}..."
    echo "################################################"
    # Check for meta-pkg updates

Modified: pcbsd/current/src-sh/warden/scripts/backend/checkupdates.sh
===================================================================
--- pcbsd/current/src-sh/warden/scripts/backend/checkupdates.sh	2012-10-10 17:20:31 UTC (rev 19634)
+++ pcbsd/current/src-sh/warden/scripts/backend/checkupdates.sh	2012-10-10 17:56:03 UTC (rev 19635)
@@ -29,6 +29,7 @@
   exit 5
 fi
 
+
 # End of error checking, now start update checking
 #####################################################################
 
@@ -38,17 +39,27 @@
   for i in `ls -d .*.meta`
   do
     if [ ! -e "${i}/ip" ] ; then continue ; fi
-    jIP="`cat ${i}/ip`"
-    echo "Checking for jail updates to ${jIP}"
+    IP="`cat ${i}/ip`"
+    set_warden_metadir
+    if [ -e "${JMETADIR}/linuxjail" ] ; then continue; fi
+
+    echo "Checking for jail updates to ${IP}"
     echo "################################################"
  
     # Check for meta-pkg updates
-    pc-metapkgmanager --chroot ${JDIR}/${jIP} checkup
+    pc-metapkgmanager --chroot ${JDIR}/${IP} checkup
 
     # Check for system-updates
-    chroot ${JDIR}/${jIP} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch'
+    chroot ${JDIR}/${IP} cat /usr/sbin/freebsd-update | sed 's|! -t 0|-z '1'|g' | /bin/sh -s 'fetch'
   done
 else
+  set_warden_metadir
+  
+  if [ -e "${JMETADIR}/linuxjail" ] ; then
+    echo "ERROR: Cannot check for updates to Linux Jails.. Please use any included Linux utilities for your disto."
+    exit 5
+  fi
+
    echo "Checking for jail updates to ${IP}..."
    echo "################################################"
    # Check for meta-pkg updates



More information about the Commits mailing list