]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dmsquash-live/apply-live-updates.sh: needs 'find'
authorHarald Hoyer <harald@redhat.com>
Fri, 24 Apr 2015 10:13:42 +0000 (12:13 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 24 Apr 2015 10:18:53 +0000 (12:18 +0200)
also add /run/initramfs/live/updates as a directory, where to pull
the updates from

https://bugzilla.redhat.com/show_bug.cgi?id=1213736

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

index d620f2c94ceaef8ff1ccf5c71b051142b0b87338..6a1993bedb7182d1c84b9969d6392ab9dc2a70a5 100755 (executable)
@@ -1,17 +1,20 @@
 #!/bin/sh
 
-if [ -b /dev/mapper/live-rw ] && [ -d /updates ]; then
+if [ -b /dev/mapper/live-rw ] && [ -d /run/initramfs/live/updates -o -d /updates ]; then
     info "Applying updates to live image..."
     mount -o bind /run $NEWROOT/run
     # avoid overwriting symlinks (e.g. /lib -> /usr/lib) with directories
-    (
-        cd /updates
-        find . -depth -type d | while read dir; do
-            mkdir -p "$NEWROOT/$dir"
-        done
-        find . -depth \! -type d | while read file; do
-            cp -a "$file" "$NEWROOT/$file"
-        done
-    )
+    for d in /updates /run/initramfs/live/updates; do
+        [ -d "$d" ] || continue
+        (
+            cd $d
+            find . -depth -type d | while read dir; do
+                mkdir -p "$NEWROOT/$dir"
+            done
+            find . -depth \! -type d | while read file; do
+                cp -a "$file" "$NEWROOT/$file"
+            done
+        )
+    done
     umount $NEWROOT/run
 fi
index 11f81219e1d231820c8a7961aaaaf0ad3b9c2872..a113c3ff7568a2aa726f6155784477c614fb3c85 100755 (executable)
@@ -22,7 +22,7 @@ installkernel() {
 
 # called by dracut
 install() {
-    inst_multiple umount dmsetup blkid dd losetup grep blockdev
+    inst_multiple umount dmsetup blkid dd losetup grep blockdev find
     inst_multiple -o checkisomd5
     inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"
     inst_hook cmdline 31 "$moddir/parse-iso-scan.sh"