Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # vim: set ft=sh:
- run_hook ()
- {
- #Taken from the original init script to init before it checks, for the boot parameter "root=" and would abort then.
- init=${init:-/sbin/init}
- # mount /usr if it exists
- realtab=/new_root/etc/fstab
- if [ -f "$realtab" ]; then
- if usr_source=$(findmnt -snero source --tab-file="$realtab" /usr); then
- mountopts=$(findmnt -snero options --tab-file="$realtab" /usr)
- fsck_device "$usr_source"
- msg ":: mounting '$usr_source' on /usr"
- mount "$usr_source" /new_root/usr -o "$mountopts"
- fi
- fi
- if [ "${break}" = "postmount" ]; then
- echo ":: Post-mount break requested, type 'exit' to resume operation"
- launch_interactive_shell
- fi
- # Stop udevd if is running
- if [ "${udevd_running}" -eq 1 ]; then
- udevadm control --exit
- udevadm info --cleanup-db
- fi
- echo exec env -i "TERM=$TERM" /sbin/switch_root /new_root $init "$@"
- exec env -i "TERM=$TERM" /sbin/switch_root /new_root $init "$@"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement