mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
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:
@@ -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
2
rootfs_overlay/eval_base64.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
eval "$(printf "$lkmc_eval" | base64 -d)"
|
||||
Reference in New Issue
Block a user