reopen 378673
severity 378673 wishlist
owner 378673 Alexander Gerasiov <[EMAIL PROTECTED]>
tags 378673 + moreinfo
thanks

Hi

On Thu, Jul 20, 2006 at 05:22:06PM +0400, Alexander Gerasiov wrote:
> Ola Lundqvist wrote:
> > Hi
> > 
> > I tried to locate this chroot-sh but could not find where it is.
> > You seem to have located it to util-vserver, how?
> 
> 
> I dig into this scripts and understand, that if xargs in function
> prepareInit (/usr/lib/util-vserver/vserver.functions) fails someone
> (couldn't find who) makes exit, that trap "cleanup" from
> /usr/lib/util-vserver/vserver.start says that error happens.
> 
> As I can see, adding "-mount" to find will help us (or may be some other
> find rules?)

Yes, but the reason for that is that if you have the -mount
option it do not clean the files as it should... But this
indicates that this...

> the following code will work ok:
> 
> 
> /usr/lib/util-vserver/vserver.functions:
> [...]
> ## Usage: prepareInit <vserver-directory>
> function prepareInit
> {
>     pushd "$1/vdir" >/dev/null
>     case "$INITSTYLE" in
>         sysv)
>             { find var/run  -mount ! -type d -print0; \
>               find var/lock -mount ! -type d -print0; } | xargs -0r
> $_CHROOT_SH rm
> [...]
> 

Can you test to instead of adding -mount to find, add -f to rm.
Or maybe instead use the following:

for A in $(find var/run ! -type d -print0) \
         $(find var/lock ! -type d -print0) ; do
        rm -f "$A"
done

It would be nice to know if that works better.

Regards,

// Ola

> 

-- 
 --- Ola Lundqvist systemkonsult --- M Sc in IT Engineering ----
/  [EMAIL PROTECTED]                   Annebergsslingan 37        \
|  [EMAIL PROTECTED]                   654 65 KARLSTAD            |
|  http://www.opal.dhs.org           Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to