Closed maximbaz closed 3 years ago
I didn't see a reason to treat /proc/cmdline and /etc/kernel/cmdline differently when extracting cmdline
I wanted to leave /proc/cmdline as is.
doesn't work in POSIX shell
btw, what doesn't work exactly?
doesn't work in POSIX shell
btw, what doesn't work exactly?
this: ?
echo -n `</proc/cmdline` >
I guess the
`< …`
shortcut?
This line, yes, my /bin/sh is dash and this echo produces an empty string, so my cmdline was empty. I will be on laptop soon to test and give you a more precise answer 🙂
$ echo "some content" > /tmp/test
$ echo `< /tmp/test`
$ echo `grep . < /tmp/test`
some content
$ echo `cat /tmp/test`
some content
I can also use cp /proc/cmdline $DEST
perhaps
I leave the choice up to you, just close this PR whenever you fix it in master one way or another 😉
fixed in dd2ae2510ea5c56993412a82e245d605cce84f94
The current syntax in master for copying
/proc/cmdline
doesn't work in POSIX shell and leaves cmdline empty and system unbootable. I didn't see a reason to treat/proc/cmdline
and/etc/kernel/cmdline
differently when extracting cmdline, so I refactored a little to use the same code.What do you think?