From: Will Woods Date: Thu, 20 Oct 2011 17:57:23 +0000 (-0400) Subject: apply-live-updates.sh: copy without glob X-Git-Tag: 014~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03b5494ca14d41b224b10ac49b64e8f236f339f7;p=thirdparty%2Fdracut.git apply-live-updates.sh: copy without glob cp $SRC/* $DEST will skip dotfiles in $SRC. ( cd $SRC; cp -a -t $DEST . ) will copy everything. --- diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh index dfdb4046e..8dce5d458 100755 --- a/modules.d/90dmsquash-live/apply-live-updates.sh +++ b/modules.d/90dmsquash-live/apply-live-updates.sh @@ -1,7 +1,8 @@ #!/bin/sh if [ -b /dev/mapper/live-rw ]; then - if [ "`echo /updates/*`" != "/updates/*" ]; then + if pushd /updates &>/dev/null; then echo "Applying updates to live image..." - /bin/cp -a /updates/* $NEWROOT + /bin/cp -a -t $NEWROOT . + popd &>/dev/null fi fi