Subject: Re: do you use sysutils/amanda-common and chg-disk changer?
To: None <tech-pkg@NetBSD.org>
From: Jukka Salmi <j+nbsd@2004.salmi.ch>
List: tech-pkg
Date: 10/11/2004 23:33:49
David Laight --> tech-pkg (2004-10-11 20:55:58 +0100):
> On Mon, Oct 11, 2004 at 08:33:06PM +0200, Manuel Bouyer wrote:
> > On Mon, Oct 11, 2004 at 11:18:36AM -0700, Jeremy C. Reed wrote:
> > > Please see PR pkg/27207
> > > http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=27207
> > > 
> > > The chg-disk shell script is not portable and a patch is provided above.
> > > 
> > > If you use sysutils/amanda-common and chg-disk please test it with some
> > > different /bin/sh shells (like bash, sh and ksh).
> > > 
> > > The patch looks fine to me. But I don't use amanda.
> > 
> > The patch looks fine for me too, but it should go in amanda-server, not
> > amanda-common.
> 
> $(($xxx + 1)) is valid on most modern (posix) shells, and saves a fork/exec.

That's what I was using until I noticed that the problem was already
fixed in Amanda 2.4.4p3[1] with using `expr $xxx + 1`. The commit
message is just "Fix for sh compatibility."[2], I don't know why they
use an external program. But accepting this saves us a patch when the
Amanda pkgsrc package is updated...


Jukka

[1] http://cvs.sourceforge.net/viewcvs.py/amanda/amanda-2/changer-src/chg-disk.sh.in?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
[2] http://cvs.sourceforge.net/viewcvs.py/amanda/amanda-2/changer-src/chg-disk.sh.in

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~