> ------------ Původní zpráva ------------
> Od: Lars Schimmer <[email protected]>
> Předmět: Re: [OpenAFS] howto release all projects by cron
> Datum: 25.1.2010 14:57:38
> ----------------------------------------
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alena Manova wrote:
> > Hello,
> >
> > does anyone have some clue how to release all volumes proj.* periodically
> using the BOS cron?
> >
> > If 'vos release' took something like -prefix (similar to backupsys) I could
> release all project easily, but 'vos release'  doesn't work like this. so I 
> need
> to iterate through all proj.* volumes.
> >
> > I would like to have it as BOS cron job without calling some external 
> > scripts,
> so I tried something like this:
> >
> > bos create <myserver> releaseproj cron -cmd "/bin/bash -c 'for volume in
> \$(/usr/sbin/vos listvldb -quiet | grep proj); do /usr/sbin/vos release 
> \$volume
> -localauth; done'" "10:49"
> >
> > it creates nice record (which should work) in BosConfig:
> >
> > parm /bin/bash -c 'for volume in $(/usr/sbin/vos listvldb -quiet | grep 
> > proj);
> do /usr/sbin/vos release $volume -localauth; done'
> > ...
> >
> > but it doesn't work - seems like the cron-inline_bash interaction fails.
> >
> > any ideas?
>
> I created a few shell scripts and just start those shell scripts from
> bos config.
> In those bash scripts I just run:
> for i in `vos listvldb -quiet -localauth|grep -i "user\."`;do vos
> release -id $i -localauth; done
>
> That will vos release user\.*
>

Thanks Lars, I tried this already, however I would prefer solution without 
calling external scripts, so that's why I wished to put everything in the bos 
cron itself.

the problem must be in bos cron cmd line interpretation:

this works fine:

bos create <mysrv> releaseproj cron -cmd "/bin/bash -c '/bin/ls'" "now"

but this fails (added parameter to the ls command):

bos create <mysrv> releaseproj cron -cmd "/bin/bash -c '/bin/ls /tmp'" "now"
(Mon Jan 25 14:08:02 2010: releaseproj exited with code 2)

so bos cron is corrupting the cmd line and bash crashes.

stepan.

> > thanks, Nick.
>
> MfG,
> Lars Schimmer
> - --
> - -------------------------------------------------------------
> TU Graz, Institut für ComputerGraphik & WissensVisualisierung
> Tel: +43 316 873-5405       E-Mail: [email protected]
> Fax: +43 316 873-5402       PGP-Key-ID: 0x4A9B1723
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAktdowwACgkQmWhuE0qbFyNF/QCff9w2mHf9XV1EFdijyKk+WHdB
> mSMAnAjDws/QUDq+u0r8yC5xTkdqPNi2
> =5tg4
> -----END PGP SIGNATURE-----
> _______________________________________________
> OpenAFS-info mailing list
> [email protected]
> https://lists.openafs.org/mailman/listinfo/openafs-info
>
>
>
_______________________________________________
OpenAFS-info mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-info

Reply via email to