: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..." >&2
+ echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
style=
is_external=
-pkgmgmt.guessStyle "$vserver" style || exit 1
+pkgmgmt.guessStyle "$vserver" style || exit 2
pkgmgmt.isInternal "$vserver" || is_external=1
cmd=()
## rpm outputs sometimes '(contains no files)', so return
## only the valid output
(get-conffiles)
- rpm_param=( -qac --pipe "sed '\!^/!p;d'" );;
+ rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
(install)
rpm_param=( -Uvh "$@" )
apt_param=( install "$@" )
;;
esac
- if test "$is_external"; then
+ if test -n "$is_external"; then
have_apt=1
test -d "$cfgdir"/base/apt -o -d "$cfgdir"/aptetc || have_apt=
else
done
fi
- if test "$is_external"; then
+ if test -n "$is_external"; then
if test "$have_apt" -a "$apt_param"; then
cmd=( "$_VAPT_GET" "$vserver" -- "${apt_param[@]}" )
else
;;
esac
- if test "$is_external"; then
+ if test -n "$is_external"; then
echo $"'external' packagemanagement is not supported for Debian" >&2
exit 1
else
cmd=( "$_VSERVER" --silent "$vserver" exec "${cmd[@]}" )
fi
;;
+ (*)
+ echo $"Packagemanagement is not supported for '$style' style" >&2
+ exit 2
+ ;;
esac
export LANG=C