Add a shortcute for /eval.sh

Create /eval_base64.sh to overcome quoting and newline limitations.

Documente poweroff's failure on readme.
This commit is contained in:
Ciro Santilli
2018-03-14 21:11:02 +00:00
parent 54feab9f00
commit e8f09a76e6
7 changed files with 91 additions and 10 deletions

View File

@@ -1,2 +1,18 @@
#!/bin/sh
echo "$lkmc_eval"
eval "$lkmc_eval"
# Ideally, this script would do just:
#
## Get rid of the '-'.
#shift
#echo "$@"
#
# However, the kernel CLI parsing is crap, and the 4.14 docs lie.
#
# In particular, not all that is passed after "-" goes to an argument to init,
# e.g. stuff with dots like "- /poweroff.out" still gets treated specially and
# does not go to init.
#
# This also likely means that the above solution is also unreliable in some cases,
# and that in the end you just have to add a script to the root filesystem.

2
rootfs_overlay/eval_base64.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
eval "$(printf "$lkmc_eval" | base64 -d)"