X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvyum-worker;h=03e9568c1bb04f3f062f58dd75cdad449369885e;hb=d644358f28547545a360401e4b3a5536dda53257;hp=2000ffad8355503f22c369fe13baa78e3142abbb;hpb=31dca46d9f8e05e7d6520e9f88c994182288d089;p=util-vserver.git diff --git a/scripts/vyum-worker b/scripts/vyum-worker index 2000ffa..03e9568 100755 --- a/scripts/vyum-worker +++ b/scripts/vyum-worker @@ -56,13 +56,24 @@ Execution will continue in 5 seconds..." yum=${YUM:-yum} conf=yum.conf -case $($yum --version|tail -n 1) in +case $(python -c "import yum; print yum.__version__" 2>/dev/null) in (2.[012345]*) check 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' ;; - (2.6*) + (2.[6789]*|3.[012]*) check 'import yum,sys; sys.exit(not hasattr(yum.config.YumConf, "getRootedPath"))' ;; + (*) + warning "\ +You are using a version of yum which current status is unknown to vyum. + +Just to be sure, 'vyum' will use dirty hacks which might not work when +the vserver is running and local DOS attacks are possible. + +Execution will continue in 5 seconds..." + sleep 5 + conf=yum-hack.conf + ;; esac rpmFake.exec $yum \