1 |
On Wed, 21 Aug 2013 21:09:41 +0100, thegeezer wrote: |
2 |
|
3 |
> > I posted a script fragment that compares the contents of the kernel's |
4 |
> > initramfs config file with the live filesystem. Dracut users could use |
5 |
> > the same method by parsing the output from lsinitrd. |
6 |
|
7 |
> the script you posted referenced /usr/src/init.cfg -- not sure if this |
8 |
> is a dracut thing but i don't have that. |
9 |
|
10 |
It's the kernel's initramfs config file, or at least the location I use |
11 |
(the location is set in the kernel config) |
12 |
|
13 |
> i was actually thinking something like the following (warning needs |
14 |
> work) |
15 |
> |
16 |
> #!/bin/bash |
17 |
> # get contents of lsinitrd | awk for month,day,time, /filename | list |
18 |
> the awked filename |
19 |
|
20 |
There's no need to get the timestamps from the initramfs, just the list |
21 |
of files. Then you compare the timestamp of the ones in your root |
22 |
filesystem with the timestamp of the file containing the initramfs. it |
23 |
saves parsing and comparing all those dates, just use the shell's -nt |
24 |
test. The only difference between using it with Dracut or the kernel's |
25 |
initramfs is how you generate the file list. |
26 |
|
27 |
|
28 |
-- |
29 |
Neil Bothwick |
30 |
|
31 |
Press every key to continue. |