Only copy /etc/live/boot if it exists debian/1%20170112
authorRaphaël Hertzog <hertzog@debian.org>
Thu, 12 Jan 2017 17:39:31 +0000 (18:39 +0100)
committerRaphaël Hertzog <hertzog@debian.org>
Thu, 12 Jan 2017 17:39:31 +0000 (18:39 +0100)
Even though /etc/live/boot is created in the postinst, that directory
is not guaranteed to exist when the initramfs is generated. It might be
generated when the kernel is configured before live-boot has been
configured.

backend/initramfs-tools/live.hook

index 09167ec..54a566f 100755 (executable)
@@ -38,7 +38,10 @@ if [ -e /etc/live/boot.conf ]
 then
        cp -a /etc/live/boot.conf "${DESTDIR}/etc/live"
 fi
-cp -a /etc/live/boot "${DESTDIR}/etc/live"
+if [ -e /etc/live/boot ]
+then
+       cp -a /etc/live/boot "${DESTDIR}/etc/live"
+fi
 
 # klibc dependencies
 for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr*