Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading value to update variable with from stdin instead of datafile #272

Open
RomanValov opened this issue Nov 14, 2024 · 0 comments
Open

Comments

@RomanValov
Copy link

Sometimes it's desirable to avoid creating temporary files on disk just to feed them to efivar later:

$ echo -ne 'data\0' | iconv -t ucs2 > ./var.bin
$ sudo efivar -w --name=... --datafile=./var.bin

I've tried using /dev/stdin and /proc/self/fd/0 but neither worked:

$ echo -ne 'data\0' | iconv -t ucs2 | sudo efivar -w --name=... --datafile=/dev/stdin
Could not use "/dev/stdin": Invalid argument
$ echo -ne 'data\0' | iconv -t ucs2 | sudo efivar -w --name=... --datafile=/proc/self/fd/0
Could not use "/proc/self/fd/0": Invalid argument

Please fix the usage or provide alternative syntax like:

$ echo -ne 'data\0' | iconv -t ucs2 | sudo efivar -w --name=... --datafile=-

P.S.: efibootmgr supports feeding arguments via stdin with -@ - .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant