Browse Source

add apply-live-updates.sh to pre-pivot hook

If we're about to start a Live image (i.e. if /dev/mapper/live-rw
exists) this script will take any files found in /updates (inside the
initramfs!) and and copy them into $NEWROOT.

This allows for hotfixes to be applied to existing Live images without
rebuilding the entire image.

Signed-off-by: Will Woods <wwoods@redhat.com>
master 012
Will Woods 14 years ago committed by Harald Hoyer
parent
commit
f116ca115c
  1. 7
      modules.d/90dmsquash-live/apply-live-updates.sh
  2. 1
      modules.d/90dmsquash-live/module-setup.sh

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

@ -0,0 +1,7 @@
#!/bin/sh
if [ -b /dev/mapper/live-rw ]; then
if [ "`echo /updates/*`" != "/updates/*" ]; then
echo "Applying updates to live image..."
/bin/cp -a /updates/* $NEWROOT
fi
fi

1
modules.d/90dmsquash-live/module-setup.sh

@ -34,6 +34,7 @@ install() {
inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh" inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"
inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh" inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh"
inst_hook pre-udev 30 "$moddir/dmsquash-liveiso-genrules.sh" inst_hook pre-udev 30 "$moddir/dmsquash-liveiso-genrules.sh"
inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
inst "$moddir/dmsquash-live-root" "/sbin/dmsquash-live-root" inst "$moddir/dmsquash-live-root" "/sbin/dmsquash-live-root"
# should probably just be generally included # should probably just be generally included
inst_rules 60-cdrom_id.rules inst_rules 60-cdrom_id.rules

Loading…
Cancel
Save