: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
--secure) OPT_SECURE=1;;
--silent) OPT_SILENT=1;;
--) shift; break;;
- *) echo $"chcontext: internal error; arg=='$1'"; exit 1;;
+ *) echo $"chcontext: internal error; arg=='$1'" >&2; exit 1;;
esac
shift
done
xid=$($_VCONTEXT --create ${OPT_SILENT:+--silent} ${OPT_CTX:+--xid "$OPT_CTX"} -- $_CTX_KEEP_ALIVE --socket "$tmpdir"/socket --timeout 60)
rc=$?
test "$rc" -ne 255 ||
- echo $"chcontext: Failed to create the context; aborting..."
+ echo $"chcontext: Failed to create the context; aborting..." >&2
exit 1
}
test "$rc" -ne 254 || xid=$OPT_CTX
test "$xid" || {
- echo $"chcontext: Failed to determine context xid; aborting..."
+ echo $"chcontext: Failed to determine context xid; aborting..." >&2
exit 1
}
test -d "$PKGDIR" || {
echo "Can not find configuration-directory for package-managment tools"
exit 1
- }
+ } >&2
findDir EXECDIR $PKGDIR/execdir /
else
VDIR=$(getPhysicalDir "$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 "$PKGDIR" || {
echo "Can not find configuration-directory for package-managment tools"
exit 1
- }
+ } >&2
findDir EXECDIR $PKGDIR/execdir /
case "$i" in
rpm) _pkgSetVarsRPM;;
apt) _pkgSetVarsApt;;
- *) echo "Unknown packaging flavor"; exit 1;;
+ *) echo "Unknown packaging flavor" >&2; exit 1;;
esac
done
build) test -x "$_VSERVER_BUILD" || failed=1;;
sysv) test -x "$INITRDDIR/vserver" || failed=1;;
devel) test -d "$INCLUDEDIR/vserver.h" || failed=1;;
- *) echo "Unknown component '$i'"
+ *) echo "Unknown component '$i'" >&2
return false
;;
esac
test -z "$failed" || {
echo "$msg: $i"
x_failed=1
- }
+ } >&2
done
test -z "$x_failed"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
#Presents the processes running in all virtual servers
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
--silent) OPTION_SILENT=$1;;
----nonamespace)OPTION_NONAMESPACE=$1;;
--) shift; break;;
- *) echo $"vserver: internal error; arg=='$1'"; exit 1;;
+ *) echo $"vserver: internal error; arg=='$1'" >&2; exit 1;;
esac
shift
done
test -d "$VSERVER_DIR" -o ! -e "$CONFDIR/$vserver.conf" || do_legacy=1
test -z "$do_legacy" || {
- echo $"WARNING: can not find configuration, assuming legacy method"
+ echo $"WARNING: can not find configuration, assuming legacy method" >&2
exec "$_VSERVER_LEGACY" "$@"
}
fi
test -d "$VSERVER_DIR" || {
echo "Can not find vserver-setup"
exit 1
-}
+} >&2
if test -e "$VSERVER_DIR"/name; then
read VSERVER_NAME <"$VSERVER_DIR"/name
fi
;;
*)
- echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}"
+ echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2
exit 2
;;
esac
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
--) shift; break;;
*)
{ setup_setOption2 "$1" "$2" && shift; } || \
- { echo $"vserver-build: internal error."; exit 1; }
+ { echo $"vserver-build: internal error."; exit 1; } >&2
;;
esac
shift
test "$VSERVER_NAME" || {
echo $"Name of vserver not specified"
exit 1
-}
+} >&2
setup_setDefaults "$VSERVER_NAME"
-d) DISTRIBUTION=$2; shift;;
--debug) set -x;;
--) shift; break ;;
- *) echo "vserver-build.apt-rpm: internal error: unrecognized option '$1'"
+ *) echo "vserver-build.apt-rpm: internal error: unrecognized option '$1'" >&2
exit 1
;;
esac
-m) mirror=$2; shift;;
--debug) set -x;;
--) shift; break ;;
- *) echo "vserver-build.skeleton: internal error: unrecognized option '$1'"
+ *) echo "vserver-build.skeleton: internal error: unrecognized option '$1'" >&2
exit 1
;;
esac
done
test -d "$ROOTDIR" || {
- echo "Root-directory '$ROOTDIR' does not exist or is invalid"
+ echo "Root-directory '$ROOTDIR' does not exist or is invalid" >&2
exit 1
}
}
set -- $(cat /etc/debian_version)
DISTRIBUTION=deb$1
else
- echo "Can not determine distribution; please specify it manually"
- echo "with the '-d' option"
+ echo \
+"Can not determine distribution; please specify it manually
+with the '-d' option" >&2
exit 1
fi >&2
}
{
test -z "$1" || _renameVserverCfg
test ! -d "$VDIR" -a ! -d "$SETUP_CONFDIR" || {
- echo "vserver-topdirectory and/or configuration exist already; "
- echo "please try to use '--force', or remove them manually"
+ echo \
+"vserver-topdirectory and/or configuration exist already;
+please try to use '--force', or remove them manually" >&2
exit 1
} >&2
done
test -d "$PKGCFGBASE" || {
- echo "pkgcfgbase-dir '$PKGCFGBASE' does not exists or is invalid"
+ echo "pkgcfgbase-dir '$PKGCFGBASE' does not exists or is invalid" >&2
exit 1
}
}
test ! -d "$PKGCFGDIR" || {
echo $
"vserver pkgmgmt-directory exists already; please try to use
-'--force'; or remove it manually"
+'--force'; or remove it manually" >&2
exit 1
}
--debug) set -x;;
--pkgmgmt) use_pkgmgmt=1;;
--) shift; break ;;
- *) echo "vserver-build.skeleton: internal error: unrecognized option '$1'"
+ *) echo "vserver-build.skeleton: internal error: unrecognized option '$1'" >&2
exit 1
;;
esac
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
_getInterfaceValue name '' "$iface"
_getInterfaceValue scope '' "$iface" "$iface/.."
- test "$ip" || { echo $"Can not read ip for '$iface'"; return 1; }
+ test "$ip" || { echo $"Can not read ip for '$iface'" >&2; return 1; }
test ! -e "$iface"/only_ip || unset dev
case "$dev" in
*.*)
test -d /proc/net/vlan || {
- echo -e $"VLAN device-name used, but vlan subsystem not enabled.\nTry to execute 'modprobe 8021q' before starting the vservers"
+ echo -e $"VLAN device-name used, but vlan subsystem not enabled.\nTry to execute 'modprobe 8021q' before starting the vservers" >&2
return 1
}
test -f /proc/net/vlan || {
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if isVserverRunning "$VSERVER_DIR"; then
- echo $"vserver '$VSERVER_NAME' already running; aborting..."
+ echo $"vserver '$VSERVER_NAME' already running; aborting..." >&2
exit 1
fi
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if ! isVserverRunning "$VSERVER_DIR" S_CONTEXT; then
- echo $"vserver '$VSERVER_NAME' is not running; aborting..."
+ echo $"vserver '$VSERVER_NAME' is not running; aborting..." >&2
umountVserver "$VSERVER_DIR" &>/dev/null || :
disableInterfaces "$VSERVER_DIR" &>/dev/null || :
exit 1
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
# Helper script for all the v_xxx scripts
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"
#Presents the processes running in all virtual servers
: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
test -e "$UTIL_VSERVER_VARS" || {
- echo "Can not find util-vserver installation; aborting..."
+ echo "Can not find util-vserver installation; aborting..." >&2
exit 1
}
. "$UTIL_VSERVER_VARS"