Check */*.rpm for signing.
[myplc.git] / plc.d / packages
index dab7fca..c8df19a 100755 (executable)
@@ -7,7 +7,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: packages,v 1.6 2007/01/30 15:56:53 thierry Exp $
+# $Id$
 #
 
 # Source function library and configuration
@@ -19,6 +19,10 @@ set -x
 
 case "$1" in
     start)
+       if [ "$PLC_BOOT_ENABLED" != "1" ] ; then
+           exit 0
+       fi
+
        MESSAGE=$"Signing and indexing node packages"
        dialog "$MESSAGE"
 
@@ -42,7 +46,7 @@ case "$1" in
            # Create a stamp once the package gets signed
            mkdir $repository/signed-stamps
 
-           for package in $repository/*.rpm ; do
+           for package in $repository/*/*.rpm ; do
                stamp=$repository/signed-stamps/$(basename $package).signed
                # If package is newer than signature stamp
                if [ $package -nt $stamp ] ; then
@@ -77,16 +81,16 @@ case "$1" in
 
            # Old command is yum-arch
            if [ $yum_arch -eq 1 ] ; then
-               yum-arch $repository
+               yum-arch $repository | tr '\r' '\n' | grep -v '^ *$'
                check
            fi
 
            # New command is createrepo
            if [ $createrepo -eq 1 ] ; then
                if [ -f $repository/yumgroups.xml ] ; then
-                   createrepo -g yumgroups.xml $repository
+                   createrepo -g yumgroups.xml $repository | tr '\r' '\n' | grep -v '^ *$'
                else
-                   createrepo $repository
+                   createrepo $repository | tr '\r' '\n' | grep -v '^ *$'
                fi
                check
            fi