Commits
Pavel Emelianov authored and Pavel Emelyanov committed 4a7ddd3db9a
CPT: fix restoring of /dev/null opened early by init The problem is the following: * init from fc9 starts and opens /dev/null for its stdin, stdout and stderr * udev starts and overmounts /dev with tmpfs After this cpt cannot dump this ve, since one process holds a file, that is inaccessible from ve root. The proposed solution is the following: 1. allow for /dev/null to be over-mounted 2. restore init's file in two stages: stage1: *before* we restored mounts restore init's 0, 1 and 2 file descriptors, since most likely (in fc9 case - definitely) init opened them before any other manipulations with fs; stage2: restore the rest files later, at usual time to make sore that e.g. sockets etc are restored properly. Comment from Alexey: ACK. Though this is really ugly, it really produces 100% correct result for this particular situation. Bug #116261 Signed-off-by: Pavel Emelyanov <xemul@openvz.org>