Age | Commit message (Collapse) | Author |
|
Add the MS_MOVE of cwd to / and chroot into it. chdir is also
called to ensure cwd does not point outside the chroot.
The switch_root toy was also blocking any case where NEW_ROOT/init
did not exist, even though NEW_INIT was a required parameter and
did not have to be '/init'. Change it to handle any NEW_INIT
passed as either a relative or absolute path.
With this change, the switch_root toy actually works from initramfs.
|
|
open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle.
|
|
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
|
|
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
|
|
|