MT#6485 Container detection in init script. Minor improve.

Just run onces the command to detect virt environment.