1 |
commit: e4ab952d639ff69e57fefa3e3855ee81d4d555fb |
2 |
Author: Peter Hjalmarsson <xake <AT> rymdraket <DOT> net> |
3 |
AuthorDate: Tue Mar 5 21:45:45 2013 +0000 |
4 |
Commit: Peter Hjalmarsson <xake <AT> rymdraket <DOT> net> |
5 |
CommitDate: Sun Mar 31 12:45:08 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=e4ab952d |
7 |
|
8 |
Add rootflags to switches we understand |
9 |
|
10 |
Nearly every general documentation including the one in the |
11 |
kernel tree and the scripts for GRUB2 all expects this flag |
12 |
to work. |
13 |
|
14 |
Signed-off-by: Peter Hjalmarsson <xake <AT> rymdraket.net> |
15 |
|
16 |
--- |
17 |
defaults/linuxrc | 24 +++++++++++++++++------- |
18 |
doc/genkernel.8.txt | 8 ++++++-- |
19 |
2 files changed, 23 insertions(+), 9 deletions(-) |
20 |
|
21 |
diff --git a/defaults/linuxrc b/defaults/linuxrc |
22 |
index f1e20ce..703652d 100755 |
23 |
--- a/defaults/linuxrc |
24 |
+++ b/defaults/linuxrc |
25 |
@@ -37,7 +37,7 @@ CMDLINE=$(cat /proc/cmdline) |
26 |
# Scan CMDLINE for any specified real_root= or cdroot arguments |
27 |
FAKE_ROOT='' |
28 |
FAKE_INIT='' |
29 |
-REAL_ROOTFLAGS='' |
30 |
+FAKE_ROOTFLAGS='' |
31 |
INIT_OPTS='' |
32 |
ROOTFSTYPE='auto' |
33 |
CRYPT_SILENT=0 |
34 |
@@ -236,6 +236,9 @@ do |
35 |
real_rootflags=*) |
36 |
REAL_ROOTFLAGS=${x#*=} |
37 |
;; |
38 |
+ rootflags=*) |
39 |
+ FAKE_ROOTFLAGS=${x#*=} |
40 |
+ ;; |
41 |
rootfstype=*) |
42 |
ROOTFSTYPE=${x#*=} |
43 |
;; |
44 |
@@ -267,13 +270,20 @@ do |
45 |
esac |
46 |
done |
47 |
|
48 |
-if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ] |
49 |
-then |
50 |
- REAL_ROOT="${FAKE_ROOT}" |
51 |
-fi |
52 |
-if [ -z "${REAL_INIT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_INIT}" != "/linuxrc" \) ] |
53 |
+if [ \( "${CDROOT}" = '0' \) ] |
54 |
then |
55 |
- REAL_INIT="${FAKE_INIT}" |
56 |
+ if [ -z "${REAL_ROOT}" -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ] |
57 |
+ then |
58 |
+ REAL_ROOT="${FAKE_ROOT}" |
59 |
+ fi |
60 |
+ if [ -z "${REAL_INIT}" -a \( "${FAKE_INIT}" != "/linuxrc" \) ] |
61 |
+ then |
62 |
+ REAL_INIT="${FAKE_INIT}" |
63 |
+ fi |
64 |
+ if [ -z "${REAL_ROOTFLAGS}" ] |
65 |
+ then |
66 |
+ REAL_ROOTFLAGS="${FAKE_ROOTFLAGS}" |
67 |
+ fi |
68 |
fi |
69 |
|
70 |
# Set variables based on the value of REAL_ROOT |
71 |
|
72 |
diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt |
73 |
index 4691a98..86d7d53 100644 |
74 |
--- a/doc/genkernel.8.txt |
75 |
+++ b/doc/genkernel.8.txt |
76 |
@@ -545,9 +545,13 @@ which the ramdisk scripts would recognize. |
77 |
*aufs*:: |
78 |
Enables support for AUFS2 (if available in the kernel). |
79 |
|
80 |
-*real_rootflags*=<...>:: |
81 |
+*rootflags*=<...>:: |
82 |
Additional flags to mount the real root system with. |
83 |
- For example *real_rootflags*=noatime would make "-o ro,noatime". |
84 |
+ For example *rootflags*=noatime would make "-o ro,noatime". |
85 |
+ |
86 |
+*real_rootflags*=<...>:: |
87 |
+ Legacy kernel parameter from kernel-2.4 initrd. |
88 |
+ Does the same as *rootflags*=, which should be used in its place. |
89 |
|
90 |
*real_resume*=<...>:: |
91 |
*resume*=<...>:: |