Bug#218530: Suboptimal conditional rune for initscripts

2003-11-02 Thread Herbert Xu
Ian Jackson <[EMAIL PROTECTED]> wrote: > > This would be better expressed as > >if type -p invoke-rc.d >/dev/null 2>&1; then >... > > This latter form will detect accurately whether invoke-rc.d is > available _on the current PATH_ as set by the sysadmin, and will > therefore allo

Bug#218530: Suboptimal conditional rune for initscripts

2003-11-02 Thread Bob Proulx
Mark Baker wrote: > Ian Jackson wrote: > > >Package: debian-policy > >Version: 3.6.1.0 > > > >While trying to merge an NMU to my package, I spotted an idiom > >obviously copied from the policy manual: > > > > if [ -x /usr/sbin/invoke-rc.d ] ; then > > invoke-rc.d package > >

Bug#218530: Suboptimal conditional rune for initscripts

2003-11-02 Thread Branden Robinson
On Sat, Nov 01, 2003 at 04:55:36PM +, Ian Jackson wrote: > Branden Robinson writes ("Re: Bug#218530: Suboptimal conditional rune for > initscripts"): > > Ah, I see the reason: > ... > > [127] [EMAIL PROTECTED]:~ % ash > > $ type ls > > ls is /

Bug#218530: Suboptimal conditional rune for initscripts

2003-11-02 Thread Ian Jackson
Herbert Xu writes ("Re: Bug#218530: Suboptimal conditional rune for initscripts"): > You'd better make that simply "type" so that it will work with > POSIX shells other than bash. Besides, there is no reason to > rule out aliases/functions/builtins since when i

Bug#218530: Suboptimal conditional rune for initscripts

2003-11-02 Thread Ian Jackson
Mark Baker writes ("Re: Bug#218530: Suboptimal conditional rune for initscripts"): > I think it's debatable whether searching the path for a command in an > init script is a good thing, but if we don't search the path for the > test we shouldn't do it when w

Bug#218530: Suboptimal conditional rune for initscripts

2003-10-31 Thread Mark Baker
Ian Jackson wrote: Package: debian-policy Version: 3.6.1.0 While trying to merge an NMU to my package, I spotted an idiom obviously copied from the policy manual: if [ -x /usr/sbin/invoke-rc.d ] ; then invoke-rc.d package else /etc/init.d/package

Bug#218530: Suboptimal conditional rune for initscripts

2003-10-31 Thread Ian Jackson
Package: debian-policy Version: 3.6.1.0 While trying to merge an NMU to my package, I spotted an idiom obviously copied from the policy manual: if [ -x /usr/sbin/invoke-rc.d ] ; then invoke-rc.d package else /etc/init.d/package fi This wo