rootfs_ipk.bbclass and ipkg.inc: shell script syntax fixes
authorMartin Dietze <di@fh-wedel.de>
Thu, 2 Nov 2006 13:54:27 +0000 (13:54 +0000)
committerMartin Dietze <di@fh-wedel.de>
Thu, 2 Nov 2006 13:54:27 +0000 (13:54 +0000)
- both files contained code which would only execute if run by bash
- the fixed versions do the same but are more portable

classes/rootfs_ipk.bbclass
packages/ipkg/ipkg.inc

index 8cea393..eeb3f75 100644 (file)
@@ -98,7 +98,7 @@ log_check() {
                        for keyword_die in "Cannot find package" "exit 1" ERR Fail
                        do                              
                                
-                               if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") &>/dev/null
+                               if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
                                then
                                        echo "log_check: There were error messages in the logfile"
                                        echo -e "log_check: Matched keyword: [$keyword_die]\n"
index adc7714..b1e2f19 100644 (file)
@@ -26,7 +26,7 @@ pkg_postinst_ipkg () {
 if [ "x$D" != "x" ]; then
        install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
        # this happens at S98 where our good 'ole packages script used to run
-       echo -e "#!/bin/sh
+       echo "#!/bin/sh
 ipkg-cl configure
 " > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${IPKG_INIT_POSITION}configure
        chmod 0755 ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${IPKG_INIT_POSITION}configure