rpm zepsuł vservera?

Jan Rękorajski baggins at pld-linux.org
Fri Oct 12 15:01:13 CEST 2012


On Fri, 12 Oct 2012, Jacek Osiecki wrote:

> Rozumiem że teraz muszę przerobić plik
> 
> /usr/lib64/util-vserver/vserver-build.functions.rpm
> 
> i tam zamiast:
> 
> function rpm.initDB
> {
>      RPM_FLAVOR=d "$_VRPM" "$1" -- --initdb
> }
> 
> zrobić coś typu;
> 
> function rpm.initDB
> {
>      rpm --dbpath /vservers/.pkg/`echo $1|cut -f 4 -d \/`/rpm/ -qa
>      RPM_FLAVOR=d "$_VRPM" "$1" -- --initdb
> }

A możesz przetestować ten pacz (zainstalowany vrpm jest w /usr/sbin)?

--- util-vserver-0.30.216-pre3034/scripts/vrpm~	2012-04-24 11:48:10.000000000 +0200
+++ util-vserver-0.30.216-pre3034/scripts/vrpm	2012-10-12 14:57:51.421696571 +0200
@@ -70,4 +70,8 @@
 export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
 
 test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- )
-exec $_VSOMETHING "${send_through[@]}" rpm "${vsomething_opts[@]}" "$@"
+if [[ "$@" = *--initdb* ]]; then
+    exec $_VSOMETHING "${send_through[@]}" rpm "${vsomething_opts[@]}" "-qa"
+else
+    exec $_VSOMETHING "${send_through[@]}" rpm "${vsomething_opts[@]}" "$@"
+fi

-- 
Jan Rękorajski                                 | PLD/Linux
SysAdm                                         | http://www.pld-linux.org/
baggins<at>mimuw.edu.pl
baggins<at>pld-linux.org


More information about the pld-devel-pl mailing list