Add a switch_root utility (like kconfig's utils/run_init.c, although not
actuall using any of that code). This is needed because pivot_root doesn't work right under initramfs. (See the menuconfig help.)
This commit is contained in:
@@ -625,6 +625,9 @@
|
||||
#ifdef CONFIG_SWAPONOFF
|
||||
APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
|
||||
#endif
|
||||
#ifdef CONFIG_SWITCH_ROOT
|
||||
APPLET(switch_root, switch_root_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
|
||||
#endif
|
||||
#ifdef CONFIG_SYNC
|
||||
APPLET(sync, sync_main, _BB_DIR_BIN, _BB_SUID_NEVER)
|
||||
#endif
|
||||
|
@@ -2735,6 +2735,12 @@
|
||||
"Options:\n" \
|
||||
"\t-a\tStart swapping on all swap devices"
|
||||
|
||||
#define switch_root_trivial_usage \
|
||||
"NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]"
|
||||
#define switch_root_full_usage \
|
||||
"Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \
|
||||
"and exec NEW_INIT.\n"
|
||||
|
||||
#define sync_trivial_usage \
|
||||
""
|
||||
#define sync_full_usage \
|
||||
|
Reference in New Issue
Block a user