On Fri, 25 Jul 2008 12:46:40 +0200
Tomasz Chmielewski <[EMAIL PROTECTED]> wrote:

> Doron Shoham schrieb:
> > Add -d flag.
> > Delete all the targets and backup the current conf file
> 
> (...)
> 
> > +# Delete all the targets and backup the current conf file
> > +sub delete {
> > +   print "deleting targets...\n";
> > +   print "a copy of the conf file is on:/etc/tgt/targets.conf.bkp\n";
> > +   `mv $configfile /etc/tgt/targets.conf.bkp`;
> > +   open FILE, ">", "$configfile" or die $!;
> > +   print FILE "<target>\n";
> > +   print FILE "</target>\n";
> 
> It essentially removes our config file if we accidentally run this 
> command twice in a row.
> I wouldn't be very happy if I lost configuration of dozens of targets...
> 
> 
> Why are we touching the config file here anyway?
> IMO, "-d" flag should just remove all targets from a running tgtd; it 
> shouldn't try to backup or modify the config file.

Agreed, I prefer to have an explicit option to touch (update) my
ocnfiguration file; other options just change my running targets'
configurations.
_______________________________________________
Stgt-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/stgt-devel

Reply via email to