1 |
On Sun, Dec 4, 2016 at 8:40 AM, Simon Thelen <gentoo-user@××××.de> wrote: |
2 |
> On 16-12-04 at 14:18, Andrew Lowe wrote: |
3 |
>> Hi all, |
4 |
>> I'm still getting the warning during boot about metalog using runscript |
5 |
>> during the boot process. I decided to track things down and see what was |
6 |
>> going on. My first stop was bugs.gentoo.org where there is this one: |
7 |
>> |
8 |
>> https://bugs.gentoo.org/show_bug.cgi?id=581926 |
9 |
>> |
10 |
>> Upon reading this, I would have thought that the ebuild had been |
11 |
>> updated with the supplied patch by the developers. I looked at the |
12 |
>> ebuild on my machine and it still is the "older" one. |
13 |
>> Packages.gentoo.org has the same ebuild as me. |
14 |
>> |
15 |
>> Has something just fallen through the cracks and things should have |
16 |
>> been "officially" updated or do I need to apply this patch myself? |
17 |
> The patch was applied to the initscript, but the ebuild was not |
18 |
> revbumped. You'll have to reinstall the package to get the new |
19 |
> initscript. You can rebuild all packages that use /sbin/runscript with: |
20 |
> `emerge --oneshot -av $(grep -l '/sbin/runscript' /etc/init.d/*)' |
21 |
> This was mentioned in a newsitem draft on gentoo-dev, but as far as I |
22 |
> can tell that newsitem was never published. |
23 |
> |
24 |
> -- |
25 |
> Simon Thelen |
26 |
> |
27 |
|
28 |
I ended up writing an ed(1) script below to edit the init scripts affected: |
29 |
sed ' |
30 |
/convert/!d |
31 |
s:^[^/]*:: |
32 |
s: .*:: |
33 |
' /var/log/rc.log | |
34 |
sort -u | |
35 |
while read file |
36 |
do |
37 |
echo e $file |
38 |
echo w $HOME/tmp/`basename $file`.runscript |
39 |
echo g/runscript/s//openrc-run/ |
40 |
echo w |
41 |
done | ed - |
42 |
|
43 |
Running the script above without piping it through to ed first prints |
44 |
the editing commands that would be run without actually running them. |
45 |
|
46 |
The script below runs the diff on the original files that have been |
47 |
backed up by the script above and the ones just been edited. |
48 |
|
49 |
ls $HOME/tmp/*.runscript | |
50 |
sed ' |
51 |
s/^/diff -u / |
52 |
h |
53 |
s:.*/\(.*\)\..*:/etc/init.d/\1: |
54 |
H |
55 |
g |
56 |
y/\n/ / |
57 |
' | sh |