From: Richard Tollerton <[email protected]>

tar -C exists in both GNU and busybox tar, so use that instead of
(cd /; tar ...). This allows the subshell to be removed.

Natinst-Rally-ID: TA44427
Acked-by: Gratian Crisan <[email protected]>
Natinst-ReviewBoard-ID: 58620
Signed-off-by: Richard Tollerton <[email protected]>
---
 meta/recipes-core/udev/udev/init       | 2 +-
 meta/recipes-core/udev/udev/udev-cache | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index a96309d..bcb9040 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -69,7 +69,7 @@ case "$1" in
                    readfiles /etc/udev/cache.data
                    OLDDATA="$READDATA"
                    if [ "$OLDDATA" = "$NEWDATA" ]; then
-                            (cd /; tar xzf $DEVCACHE --exclude=log)
+                            tar xzf $DEVCACHE -C / --exclude=log
                             not_first_boot=1
                             [ "$VERBOSE" != "no" ] && echo "udev: using cache 
file $DEVCACHE"
                             [ -e /dev/shm/udev.cache ] && rm -f 
/dev/shm/udev.cache
diff --git a/meta/recipes-core/udev/udev/udev-cache 
b/meta/recipes-core/udev/udev/udev-cache
index 154d2ad..11c5f0e 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -25,7 +25,7 @@ fi
 
 if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
        [ "${VERBOSE}" != "no" ] && echo "Populating dev cache"
-       (cd /; tar czf "$DEVCACHE" dev)
+       tar czf "$DEVCACHE" dev -C / --exclude=log
        mv /dev/shm/udev.cache /etc/udev/cache.data
 fi
 
-- 
2.0.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to