gentoo: use /var/run for new /run compatibility
[util-vserver.git] / scripts / vyum-worker
index ccfd5a9..03e9568 100755 (executable)
@@ -56,19 +56,19 @@ 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.[6789]*|3.0*)
+    (2.[6789]*|3.[012]*)
        check 'import yum,sys; sys.exit(not hasattr(yum.config.YumConf, "getRootedPath"))'
        ;;
     (*)
-       warning"\
+       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 vsrever is running and local DOS attacks are possible.
+the vserver is running and local DOS attacks are possible.
 
 Execution will continue in 5 seconds..."
        sleep 5