mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH 1/2] apply-live-updates.sh: copy without glob
@ 2011-10-20 17:57 Will Woods
       [not found] ` <1319133444-27980-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Will Woods @ 2011-10-20 17:57 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

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 files 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 dfdb404..8dce5d4 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
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-21 11:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20 17:57 [PATCH 1/2] apply-live-updates.sh: copy without glob Will Woods
     [not found] ` <1319133444-27980-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-10-20 17:57   ` [PATCH 2/2] make livenet module optional Will Woods
     [not found]     ` <1319133444-27980-2-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-10-21 11:16       ` Harald Hoyer
2011-10-21 11:18   ` [PATCH 1/2] apply-live-updates.sh: copy without glob Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox