mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
Create /eval_base64.sh to overcome quoting and newline limitations. Documente poweroff's failure on readme.
19 lines
540 B
Bash
Executable File
19 lines
540 B
Bash
Executable File
#!/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.
|