}
test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1"
- _mountFilesystemsInternal "$cfgdir"/fstab || return 1
- _mountFilesystemsInternal "$cfgdir"/fstab.local || return 1
- _mountFilesystemsInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || return 1
+ _mountFilesystemsInternal "$cfgdir"/fstab || return 1
+ _mountFilesystemsInternal "$cfgdir"/fstab.local || return 1
+ _mountFilesystemsInternal "$cfgdir"/fstab.remote "${CHBIND_CMD[@]}" || return 1
}
function _umountFilesystems()
test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$1"
pushd "$vdir/" >/dev/null || return 1
- _umountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || is_ok=
- _umountVserverInternal "$cfgdir"/fstab.local || is_ok=
- _umountVserverInternal "$cfgdir"/fstab || is_ok=
+ _umountVserverInternal "$cfgdir"/fstab.remote "${CHBIND_CMD[@]}" || is_ok=
+ _umountVserverInternal "$cfgdir"/fstab.local || is_ok=
+ _umountVserverInternal "$cfgdir"/fstab || is_ok=
popd >/dev/null || return 1
test -n "$is_ok"
"
case $2 in
- (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
+ (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi "${YUM_RELEASEPKGS[@]}")
hasSubstring "$pkgs" ---rpm--- || {
warning "$ERR
* The vserver does not seem to have the 'rpm' package which is required
ERR=
}
- hasSubstring "$pkgs" ---apt--- ---yum--- || {
+ hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- || {
warning "$ERR
* The vserver does not seem to have a depsolver like 'apt' or 'yum'
installed. It is suggested to install such a program before setting
ERR=
}
- test -n "$have_apt" || test -z "$have_yum" || \
+ test -n "$have_apt" || test -n "$have_urpmi" ||
+ test -z "$have_yum" || \
hasSubstring "$pkgs" "${YUM_RELEASEPKGS[@]}" || {
warning "$ERR
* yum requires a special package which describes the version of the
local vserver=$1
local is_internalize=$2
local have_apt
+ local have_yum
+ local have_urpmi
local cfgdir
local i
## Figure out the environment....
have_apt=1
have_yum=1
+ have_urpmi=1
pkgmgmt.isAptAvailable "$cfgdir" "$vdir" "$is_internalize" || have_apt=
pkgmgmt.isYumAvailable "$cfgdir" "$vdir" "$is_internalize" || have_yum=
+ pkgmgmt.isUrpmiAvailable "$cfgdir" "$vdir" "$is_internalize" || have_urpmi=
local APTETCDIR=
local APTSTATEDIR=
popd >/dev/null
if test -n "$have_apt"; then
- findDir APTETCDIR "$cfgdir"/aptetc "$cfgdir"/base/apt/etc /etc/apt /
+ findDir APTETCDIR "$cfgdir"/aptetc "$cfgdir"/base/apt/etc /etc/apt /
+ elif test -n "$have_urpmi"; then
+ findDir URPMISTATEDIR "$cfgdir"/base/var/lib/urpmi
+ findDir URPMIETCDIR "$cfgdir"/base/etc/urpmi
fi
- findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
- findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
+ findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc \
+ "$cfgdir"/base/etc/rpm /etc/rpm /
+ findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state \
+ "$cfgdir"/base/var/lib/rpm
else
mkdir -m755 -p "$cfgdir"
local need_base=
pushd "$vdir" >/dev/null
_hashAuto /etc/apt/apt.conf '/'
popd >/dev/null
+ elif test -n "$have_urpmi"; then
+ _copySecure "$vdir" "$URPMISTATEDIR" /var/lib/urpmi
+ _copySecure "$vdir" "$URPMIETCDIR" /etc/urpmi
fi
_copySecure "$vdir" "$RPMETCDIR" /etc/rpm
return 1
} >&2
- _setVserverDir
+ _setVserverDir "$vserver"
_setVserverName
_setVserverDirName
pkgmgmt.initVariables