use $(LIBENSCVECTOR) instead of libensc_vector.a
[util-vserver.git] / util-vserver / scripts / functions
index e0a1f3f..e9123f8 100644 (file)
@@ -129,7 +129,7 @@ function colorize
        "$@"
     else
        local   cfile
-       findFile cfile "$CONFDIR"/.defaults/styles/"$style" ''
+       findFile cfile "$__CONFDIR"/.defaults/styles/"$style" ''
        if test -n "$cfile"; then
          $_CAT "$cfile"
        else
@@ -212,14 +212,14 @@ function _pkgSetVarsBase
            fi
            ;;
         *)
-           BASEDIR=$CONFDIR/$vserver
+           BASEDIR=$__CONFDIR/$vserver
            test -d "$BASEDIR" || {
                echo "Can not find configuration-directory"
                exit 1
            } >&2
            
            VDIR=$BASEDIR/vdir
-           test -d "$VDIR"   || VDIR=$DEFAULT_VSERVERDIR/$vserver
+           test -d "$VDIR"   || VDIR=$__DEFAULT_VSERVERDIR/$vserver
            VDIR=$(getPhysicalDir "$VDIR")
            
            PKGDIR=$BASEDIR/apps/pkgmgmt
@@ -393,7 +393,7 @@ function isAvoidNamespace
     $_VSERVER_INFO - FEATURE namespace   || return 0
     cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0
     test ! -e "$cfgdir"/namespace        || return 1
-    test -e "$CONFDIR"/.defaults/nonamespace -o \
+    test -e "$__CONFDIR"/.defaults/nonamespace -o \
          -e "$cfgdir"/nonamespace
 }
 
@@ -402,7 +402,7 @@ function getAllVservers
     local _ga_i
     declare -a _ga_tmp=()
 
-    for _ga_i in $CONFDIR/*; do
+    for _ga_i in $__CONFDIR/*; do
        test   -d "$_ga_i"          || continue
        test ! -e "$_ga_i"/disabled || continue
        test   -d "$_ga_i"/vdir     || continue
@@ -410,7 +410,7 @@ function getAllVservers
            *.~*~) continue;;
        esac
 
-       _ga_tmp=( "${_ga_tmp[@]}" "${_ga_i##$CONFDIR/}")
+       _ga_tmp=( "${_ga_tmp[@]}" "${_ga_i##$__CONFDIR/}")
     done
 
     eval $1='( "${_ga_tmp[@]}" )'
@@ -511,8 +511,8 @@ function checkComponents
        case "$i" in
            (core)      test -x "$_CHBIND"           || failed=1;;
            (build)     test -x "$_VSERVER_BUILD"    || failed=1;;
-           (sysv)      test -x "$INITRDDIR/vserver" || failed=1;;
-           (devel)     test -d "$INCLUDEDIR/vserver.h" || failed=1;;
+           (sysv)      test -x "$__INITRDDIR/vserver"    || failed=1;;
+           (devel)     test -d "$__INCLUDEDIR/vserver.h" || failed=1;;
            (*)         echo "Unknown component '$i'" >&2
                        return false
                        ;;
@@ -559,7 +559,7 @@ function setDefaultTTY
     cfgdir=$($_VSERVER_INFO "$1" APPDIR init) || cfgdir=
     findObject -e ttyname \
        ${cfgdir:+"$cfgdir"/tty} \
-       "$CONFDIR/.defaults/apps/init/tty" \
+       "$__CONFDIR/.defaults/apps/init/tty" \
        $2 /dev/null
 
     exec   <$ttyname
@@ -685,10 +685,10 @@ function vshelper.doSanityCheck
        }
     fi
 
-    test -d "$VSHELPERSTATEDIR" || {
+    test -d "$__VSHELPERSTATEDIR" || {
        warnings=( "${warnings[@]}"
                   $"\
-The vshelper state-directory '$VSHELPERSTATEDIR' does not exist; since
+The vshelper state-directory '$__VSHELPERSTATEDIR' does not exist; since
 it is created by 'make install', this indicates a serious problem with
 your util-vserver installation" )
        solution_disable=1
@@ -709,9 +709,9 @@ To fix this, you can:"
 
        test -z "$solution_disable" || warning $"\
 * disable vshelper entirely by executing
-  | touch \"$CONFDIR/.defaults/apps/vshelper/disabled\"
+  | touch \"$__CONFDIR/.defaults/apps/vshelper/disabled\"
 * disable only this message by executing
-  | touch \"$CONFDIR/.defaults/apps/vshelper/warning-disabled\""
+  | touch \"$__CONFDIR/.defaults/apps/vshelper/warning-disabled\""
 
        test -x "$solution_sysctl" || warning $"\
 * configure the util-vserver vshelper script, e.g. by adding
@@ -731,7 +731,7 @@ To fix this, you can:"
 function vshelper.isEnabled
 {
     local f=${1:+$1-}disabled
-    test ! -e "$CONFDIR"/.defaults/apps/vshelper/"$f"       || return 1
+    test ! -e "$__CONFDIR"/.defaults/apps/vshelper/"$f"       || return 1
     $_VSERVER_INFO - FEATURE vshelper                       || return 1
     if test -n "$2"; then
        local appdir
@@ -745,7 +745,7 @@ function vshelper.isEnabled
 ## Usage: vshelper.isDebug [<vserver>]
 function vshelper.isDebug
 {
-    test ! -e "$CONFDIR"/.defaults/apps/vshelper/debug     || return 1
+    test ! -e "$__CONFDIR"/.defaults/apps/vshelper/debug           || return 1
     $_VSERVER_INFO - FEATURE vshelper                       || return 1
     if test -n "$1"; then
        local appdir
@@ -796,8 +796,8 @@ function vshelper.getHandler
 
     test -z "$_vgh_appdir" || _vgh_search_list=( "${_vgh_search_list[@]}" -x "$_vgh_appdir/$3" )
     test -z "$_vgh_appdir" || _vgh_search_list=( "${_vgh_search_list[@]}" -e "$_vgh_appdir/action" )
-    _vgh_search_list=( "${_vgh_search_list[@]}" -x "$CONFDIR"/.defaults/apps/vshelper/"$3" )
-    _vgh_search_list=( "${_vgh_search_list[@]}" -e "$CONFDIR"/.defaults/apps/vshelper/action )
+    _vgh_search_list=( "${_vgh_search_list[@]}" -x "$__CONFDIR"/.defaults/apps/vshelper/"$3" )
+    _vgh_search_list=( "${_vgh_search_list[@]}" -e "$__CONFDIR"/.defaults/apps/vshelper/action )
 
     ! vshelper._getHandlerInternal "$1" "${_vgh_search_list[@]}" || return 0
     eval $1=':restart'
@@ -814,7 +814,7 @@ function vshelper.doInit
        return 1
     }
 
-    local f="$VSHELPERSTATEDIR/$xid"
+    local f="$__VSHELPERSTATEDIR/$xid"
     
     set -C
     $_RM -f "$f"
@@ -839,7 +839,7 @@ function vshelper.doDestroy
 {
     vshelper.isEnabled || return 0
 
-    $_RM -f "$VSHELPERSTATEDIR/$2"
+    $_RM -f "$__VSHELPERSTATEDIR/$2"
 }
 
 ## Usage: vshelper.initSync <vserver> <pipe-varname>
@@ -863,7 +863,7 @@ function vshelper.getSyncTimeout
     local _vgst_appdir _vgst_file _vgst_tmp
     _vgst_appdir=$($_VSERVER_INFO "$1" APPDIR vshelper) || _vgst_appdir=
 
-    findFile _vgst_file ${_vgst_appdir:+"$_vgst_appdir"/sync-timeout} "$CONFDIR"/.defaults/apps/vshelper/sync-timeout ''
+    findFile _vgst_file ${_vgst_appdir:+"$_vgst_appdir"/sync-timeout} "$__CONFDIR"/.defaults/apps/vshelper/sync-timeout ''
     test -n "$_vgst_file" || return 1
     read _vgst_tmp <"$_vgst_file"
     eval $2=\$_vgst_tmp