]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
apply-live-updates.sh: copy without glob
authorWill Woods <wwoods@redhat.com>
Thu, 20 Oct 2011 17:57:23 +0000 (13:57 -0400)
committerHarald Hoyer <harald@redhat.com>
Fri, 21 Oct 2011 11:18:06 +0000 (13:18 +0200)
cp $SRC/* $DEST will skip dotfiles in $SRC.
( cd $SRC; cp -a -t $DEST . ) will copy everything.

modules.d/90dmsquash-live/apply-live-updates.sh

index dfdb4046e9ebb42c288e363d9577aa64fccbd903..8dce5d45806ba6c5ff18729300d575486bda1b3a 100755 (executable)
@@ -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