add some useful bash function for start up scripts
Merge branch 'master' into 14.04