X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F43disable_updateinitramfs;h=0a6c7c0b1530d3d7acb031036366322d1f5d3e3e;hb=932d2cf46ff25194e5daec19c85f2669e239119a;hp=dab22909f01faaf6fa65d3c47cd6f28131abb504;hpb=20b64e6e2a68d1f03d4029dec4021707783bfda9;p=live-boot-grml.git diff --git a/scripts/live-bottom/43disable_updateinitramfs b/scripts/live-bottom/43disable_updateinitramfs index dab2290..0a6c7c0 100755 --- a/scripts/live-bottom/43disable_updateinitramfs +++ b/scripts/live-bottom/43disable_updateinitramfs @@ -30,10 +30,12 @@ chroot /root dpkg-divert --add --rename --quiet \ /usr/sbin/update-initramfs # Running off a USB disk or other writable media. -if [ -w /cdrom ] +if [ -w /root/cdrom ] && \ + # rw is guaranteed to be first. + grep -q ' /root/cdrom rw[, ]' /proc/self/mountinfo then -cat > /root/usr/sbin/update-initramfs << EOF +cat > /root/usr/sbin/update-initramfs << 'EOF' #!/bin/sh update-initramfs.distrib "$@"