adddivert / rmalldivert

Kjetil Torgrim Homme kjetilho at linpro.no
Thu Apr 25 12:20:06 CEST 2002


bblack at superiorbroadband.com writes:

> What i think should happen is either 
> 1)  Adddivert checks to see if $item already exists in $divertlist
>     If it does echo some error message about it already being 
>        in $divertlist but do not add it or call mkdivert.
> 2)  rmdivert checks to see if a divert actually exists before it 
>       rms the "old" binary which very well could already be the 
>       restored original binary.

I'd prefer

  3) rmdivert removes one occurence of the binary from the list.  if
     there are any occurences left, leave the divertion in place, else
     restore the binary.

this way we get proper reference counting, and the divertion is in
place as long as it is needed.


Kjetil T.



More information about the linux-fai mailing list