move init code out from daemon()
move init code out from daemon()

Signed-off-by: Lai Jiangshan <b337eedf453972390e4695e362aeea2634ef4e0c@gmail.com>

gao-feng/runv,laijs/runv,feiskyer/runv,hyperhq/runv,laijs/runv,hyperhq/runv,bergwolf/runv,gnawux/runv,wrouesnel/runv,bergwolf/runv,gao-feng/runv,gao-feng/runv,feiskyer/runv,jinfenw/runv,jinfenw/runv,gnawux/runv,gnawux/runv,bergwolf/runv,jinfenw/runv,laijs/runv,hyperhq/runv,wrouesnel/runv