Closed jgoerzen closed 10 years ago
Try this:
Extract the initrd:
mkdir /tmp/initrd
cd /tmp/initrd
zcat /boot/initrd.img-`uname -r` | cpio -i
Then create a test script like so:
#!/tmp/initrd/bin/sh
. /tmp/initrd/scripts/functions
if type run_scripts > /dev/null 2>&1 ; then
echo run_scripts exist
else
echo no run_scripts
fi
and run it:
debian:/tmp/initrd# /tmp/test
run_scripts exist
The second one (the -f part) is valid though. Fixing...
Considering this fixed in version 0.6.3-0.13~ga77c4c~wheezy
. Please reopen if not...
@FransUrbo , I think this will be of interest to you.
In the older zfs-initramfs, we see this, in /usr/share/initramfs-tools/scripts/zfs:
...
etc.
Then, at some point, it changed to:
Note: run_scripts is a function, so this test is going to fail. This code was in zfs-initramfs 0.6.3-0.7~g0ad85e~wheezy. I cannot find that commit in this repo, however.
Then, it got worse:
/scripts/local-top is always a directory, and -f will always fail on it. I have no idea what this gratuitous test is intended to do, since it seems to be testing things that are always the same, but it has the effect of breaking resume from suspend, LVM, encrypted root, and just about everything else in the initramfs. It's from 0.6.3-0.12~ga77c4c~wheezy.