1 |
commit: 3a005bbaea41cf1e87e6a256bbf9e53cd26584a9 |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 4 05:52:41 2017 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 4 05:52:41 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=3a005bba |
7 |
|
8 |
initrd.scripts: fix cdupdate.sh path check |
9 |
|
10 |
This has been broken since the v3.4.52 release, more than 2 years ago. |
11 |
Looks like cdupdate.sh gets very little use. |
12 |
|
13 |
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=593866 |
14 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
15 |
|
16 |
defaults/initrd.scripts | 10 +++++++--- |
17 |
1 file changed, 7 insertions(+), 3 deletions(-) |
18 |
|
19 |
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts |
20 |
index efc6421..ee9aeb5 100644 |
21 |
--- a/defaults/initrd.scripts |
22 |
+++ b/defaults/initrd.scripts |
23 |
@@ -1410,10 +1410,14 @@ verbose_kmsg() { |
24 |
cdupdate() { |
25 |
if [ "${CDROOT}" = '1' ] |
26 |
then |
27 |
- if [ -x /${CDROOT_PATH}/cdupdate.sh ] |
28 |
+ cdupdate_path='' |
29 |
+ for p in /${NEW_ROOT}/${CDROOT_PATH}/ /${CDROOT_PATH}/ ; do |
30 |
+ [ -x "${p}/cdupdate.sh" ] && cdupdate_path="${p}/cdupdate.sh" && break |
31 |
+ done |
32 |
+ if [ -n "${cdupdate_path}" ] |
33 |
then |
34 |
- good_msg "Running cdupdate.sh" |
35 |
- ${CDROOT_PATH}/cdupdate.sh |
36 |
+ good_msg "Running cdupdate.sh ($cdupdate_path)" |
37 |
+ ${cdupdate_path} |
38 |
if [ "$?" != '0' ] |
39 |
then |
40 |
bad_msg "Executing cdupdate.sh failed!" |