move some functions to common.sh, in order to use by others like pxe-install