From f58b14d3adc4013f674f72d83e9f7fc1110433bb Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Mon, 15 Feb 2010 23:53:30 -0300 Subject: [PATCH] Add more tests when verify if /new_root is mounted. At last with this change, makes /new_root from archiso also works. Signed-off-by: Gerardo Exequiel Pozzi --- init | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/init b/init index 3134530..12184ce 100644 --- a/init +++ b/init @@ -110,7 +110,9 @@ mkdir -p /new_root ${mount_handler} /new_root [ -z "${init}" ] && init="/sbin/init" -if [ "$(stat -f -c %i /)" = "$(stat -f -c %i /new_root)" ]; then +if [ "$(stat -f -c %i /)" = "$(stat -f -c %i /new_root)" ] && + [ "$(stat -f -c %t /)" = "$(stat -f -c %t /new_root)" ] && + [ "$(stat -f -c %T /)" = "$(stat -f -c %T /new_root)" ]; then # Nothing got mounted on /new_root. This is the end, we don't know what to do anymore # We fall back into a shell, but the shell has now PID 1 # This way, manual recovery is still possible. -- 1.6.6.1