1 |
On Tue, 20 Aug 2013 13:10:26 +0100, Neil Bothwick wrote: |
2 |
|
3 |
> > So, how do/can you *guarantee* that nothing ever gets out of sync? |
4 |
> |
5 |
> You could add a custom postinst function to /etc/portage that would |
6 |
> check whether any of the files included in your initramfs are newer than |
7 |
> the initramfs/kernel and send an ewarn if so. |
8 |
|
9 |
Running this once after each emerge world/system would be more efficient |
10 |
than running it after every package, something like this |
11 |
|
12 |
#!/bin/sh |
13 |
|
14 |
KERNEL="/boot/vmlinuz-$(uname -r)" |
15 |
|
16 |
for FILE in $(awk '/^file/ {print $3}' /usr/src/init.cfg); do |
17 |
if [[ ${FILE} -nt ${KERNEL} ]]; then |
18 |
echo "${FILE} is newer than initramfs" |
19 |
fi |
20 |
done |
21 |
|
22 |
Incidentally, testing this showed that my busybox has been updated since |
23 |
the kernel was built, but I have managed to reboot without the sky |
24 |
falling in. |
25 |
|
26 |
|
27 |
-- |
28 |
Neil Bothwick |
29 |
|
30 |
On the other hand, you have different fingers. |