|
From: Kevin C. <kc...@au...> - 2002-11-30 22:21:53
|
On Saturday 30 November 2002 12:23, Michel Bouissou wrote: > > And of course, things didn't work as expected, because the damn thing > > asked for confirmations and took parts of the following commands as > > supposed answers to its confirmation demands. > > Found a solution, yet this is (just another) minor bug. > > Inserting a blank line between each command in the script allows it to get > the "confirmations" it requests. > > So this script works: > > #! /bin/bash > evms -c -v1 << EOF2 > revert:/dev/evms/snap_racine: > > revert:/dev/evms/snap_boot: > > revert:/dev/evms/snap_usr: > > revert:/dev/evms/snap_var: > > revert:/dev/evms/snap_tmp: > > revert:/dev/evms/snap_home: > > commit: > exit > EOF2 Hmm....you've kind of come up with a unique way to write CLI scripts. The CLI is currently written to allow commands to be specified in a command-file, and run the commands in that file using the "-f" options. So in this example, you would have a file, say "snap_delete", that contains: revert:/dev/evms/snap_racine: revert:/dev/evms/snap_boot: revert:/dev/evms/snap_usr: revert:/dev/evms/snap_var: revert:/dev/evms/snap_tmp: revert:/dev/evms/snap_home: commit and then run this file using: evms -v1 -f snap_delete In "-f" mode, the CLI will not prompt for confirmation after each command, but will instead just assume the default choices. This would be the same behavior that you achieved with the above bash script. Kevin Corry |