From 03b5494ca14d41b224b10ac49b64e8f236f339f7 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 20 Oct 2011 13:57:23 -0400 Subject: [PATCH] apply-live-updates.sh: copy without glob 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh index dfdb4046..8dce5d45 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