Merge 0.30.214.
[util-vserver.git] / gentoo / util-vserver
index 1827326..c7ff359 100644 (file)
@@ -29,36 +29,32 @@ kill_contexts() {
 
 start() {
        : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
-       if [[ ! -e ${UTIL_VSERVER_VARS} ]]; then
+       if [ ! -e ${UTIL_VSERVER_VARS} ]; then
                eerror "Cannot find util-vserver installation"
                eerror "(the file '$UTIL_VSERVER_VARS' would be expected)"
                return 1
        fi
        
-       source ${UTIL_VSERVER_VARS}
-       source "$_LIB_FUNCTIONS"
-       source "$__PKGLIBDIR/vserver.functions"
+       . ${UTIL_VSERVER_VARS}
 
        ebegin "Setting vshelper path to $_VSHELPER"
        set_helper
        eend $?
 
        ebegin "Loading default device map"
-       loadDeviceMap 0 "$__CONFDIR/.defaults/apps/vdevmap"
+       $__PKGLIBDIR/bash-wrapper 'loadDeviceMap 0 "$__CONFDIR/.defaults/apps/vdevmap"'
        eend $?
 }
 
 stop() {
        : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
-       if [[ ! -e ${UTIL_VSERVER_VARS} ]]; then
+       if [ ! -e ${UTIL_VSERVER_VARS} ]; then
                eerror "Cannot find util-vserver installation"
                eerror "(the file '$UTIL_VSERVER_VARS' would be expected)"
                return 1
        fi
        
-       source ${UTIL_VSERVER_VARS}
-       source "$_LIB_FUNCTIONS"
-       source "$__PKGLIBDIR/vserver.functions"
+       . ${UTIL_VSERVER_VARS}
 
        ebegin "Stopping all running guests"
        $_START_VSERVERS -j 1 --all --stop