View previous topic :: View next topic |
Author |
Message |
halcon l33t
Joined: 15 Dec 2019 Posts: 649
|
Posted: Thu Dec 03, 2020 11:32 pm Post subject: [SOLVED] genkernel init: "run" before commands |
|
|
Hi,
I'm trying to edit genkernel's init script. And I wonder why most its commands are "prefixed" with run:
Code: | run umount "${NEW_ROOT}"
run rm -rf "${NEW_ROOT}/*"
run mkdir /union_changes |
Is it some mandatory syntax or what?
I searched for a bash command "run" - nothing; for "run()" function in genkernel's scripts - nothing; in the web also...
EDIT
I found it:
https://github.com/gentoo/genkernel/blob/369cfa98f72675a285ec98439e9054ab57b234c9/defaults/initrd.scripts#L989 _________________ A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3491
|
Posted: Fri Dec 04, 2020 3:07 pm Post subject: |
|
|
Yup, I've been thinking it would be some sort of a wrapper that provides consistent output formatting.
I've done a very similar thing in my own custom initramfs. Good stuff, makes early boot log much easier to read. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|