diff options
author | Milton D. Miller II <miltonm@us.ibm.com> | 2016-02-27 15:48:52 -0600 |
---|---|---|
committer | Milton D. Miller II <miltonm@us.ibm.com> | 2016-03-04 10:51:48 -0600 |
commit | 90b68474b0708c74e49947de0d495a311b9f54ac (patch) | |
tree | f5e6742aab2288f5dcdbbffaf5697995df59cca9 /meta-phosphor/common/recipes-phosphor | |
parent | 5d187bfa2a79fbf217e5145b7345adc6fe9351eb (diff) | |
download | talos-openbmc-90b68474b0708c74e49947de0d495a311b9f54ac.tar.gz talos-openbmc-90b68474b0708c74e49947de0d495a311b9f54ac.zip |
init: Read options from a file
Grep options from a file instead of directly from /proc/cmdline
which will allow additonal sources for options.
Initially the options file is just a copy of the kernel command
line, but it may be edited at debug-init-sh or via a later
debug_takeover point or before restarting init.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh index 12c5a2f1b..d3b4b9ff5 100644 --- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh +++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh @@ -101,10 +101,16 @@ init=/sbin/init fsckbase=/sbin/fsck. fsck=$fsckbase$rwfst fsckopts=-a +optfile=/run/initramfs/init-options + +if test ! -f $optfile +then + cat /proc/cmdline > $optfile +fi echo rofs = $rofs $rofst rwfs = $rwfs $rwfst -if grep -w debug-init-sh /proc/cmdline +if grep -w debug-init-sh $optfile then debug_takeover "Debug initial shell requested by command line." fi @@ -118,7 +124,7 @@ then mv /${imagebasename}* ${image%$imagebasename} fi -if grep -w clean-rwfs-filesystem /proc/cmdline +if grep -w clean-rwfs-filesystem $optfile then echo "Cleaning of read-write overlay filesystem requested." touch $trigger |