Released vzstats 0.3.1- add options --help, --view, --enable, --disable and --status
- add vzstats(8) man page
- add lsbrelease script
- fix vzlist script to work with older vzctl
- add proxy discovery code
- add bash_completion script
(this is a respin due to missed VERSION fix in vzstats)
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzstats: allow to process options even if disabledEven if vzstats is disabled, allow it to process command line options.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzstats: allow more than one optionLoop through options as long as we have any.
This also fixes "unbound variable: $0" introduced by commit 3e61686.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzstats discover_proxy(): use local variable1. Rename PROXY to proxy_line
2. Mark it as local to limit scope
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzstats: autodiscover http proxyAdded function to autodiscover http proxy if possible
1. if http_proxy already set, do nothing,
else
2. read /etc/wgetrc and use http_proxy setting if configured,
else
3. read /etc/yum.conf and use procy setting if configured,
else
4. do nothing and go on
[kir@openvz.org: improved regexes, strip whitespace from wget config]
bin/vzlist: check vzlist is availableDon't try to call vzlist many times if it's not available (for some
reason).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
bin/vzlist: don't ask for unsupported fieldsAs reported in
http://www.mail-archive.com/users@openvz.org/msg04770.html:
> 2) vzlist script relyes on some newer vzctl version, for example, my
> system has backported vzctl 3.0.30.2 , and it doesn't contain output
> fields like 'layout' and 'vswap' , so it just exits.
So, let's check if fields are supported by vzlist and only use ones that
are supported.
Note:
* "layout" was added in vzct...
bin/lsbrelease: addFrom http://www.mail-archive.com/users@openvz.org/msg04770.html:
> 1) osrelease script tryes to find /etc/*-release which is not used in
> Debian. As solution I think it is possible to use lsb_release as
> distro-independent way to detect release.
Suggested-by: CoolCold <coolthecold@gmail.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Released vzstats 0.2.1- fixed compatibility with older (as of RHEL5/4) userspace
- stricter checks for scripts permission and ownership
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzstats: improve find1. Do not use -perm /mode since it is not available in CentOS 4 find.
2. Add -maxdepth 1 just in case to not dive in too deep.
3. Exclude files
- writeable by group or others
- not belonging to root:root
- not readable by user
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzstats: fix for older find/mktempOld versions of find don't understand -executable, so let's user -perm
instead.
Old versions of mktemp don't have --suffix, so don't use it.
By "old" I mean versions from RHEL5.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Makefile: fix for older tarOld tar versions don't understand --exclude-vcs so let's use --exclude
.git instead.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzstats: add timeout to curlIt doesn't make sense to wait too much if the server is unavailable.
So let's add a 3 seconds connect timeout (which is still pretty big
but not hopeless).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
bin/df: only limit to /vzLet's not expose too much information, only reporting about /vz
(or whenever $VE_PRIVATE points us to).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Add vzlist scriptShould get info about how many containers running/total,
plus how many of those use ploop and vswap.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>