Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2009 20:37:58 -0400 (EDT)
From:      vogelke+unix@pobox.com (Karl Vogel)
To:        freebsd-questions@freebsd.org
Subject:   Re: sorta newb help compiling samba
Message-ID:  <20090411003758.D80D0BE71@kev.msw.wpafb.af.mil>
In-Reply-To: <20090410214414.acc2dc6d.freebsd@edvax.de> (message from Polytropon on Fri, 10 Apr 2009 21:44:14 %2B0200)

next in thread | previous in thread | raw e-mail | index | archive | help
>> On Fri, 10 Apr 2009 21:44:14 +0200, 
>> Polytropon <freebsd@edvax.de> said:

P> Why don't you use echo -n which suppresses the newline instead of involving
P> another program to do something that echo can do on its own?  This is how
P> FreeBSD does it in its system scripts.

   Some of my scripts date back to 1994, and they've been run under FreeBSD,
   Linux, and Solaris using /bin/sh, ATT Korn shell, Solaris's version
   of the Korn shell (which is sure as hell *NOT* the same thing), pdksh,
   and bash.  Unfortunately, "echo -n" hasn't behaved consistently, so I
   used the (pretty gross) hack

      # echo without newline
      necho () {
        echo "$*" | tr -d '\012'
      }

P> And according to
P>   test -d /usr/bin || exit 0 # /usr not mounted
P> Woudln't it be more compliant to exit 1 to signal an error due to /usr not
P> being mounted?

   Probably.  The only times I've ever tried to do anything without /usr
   mounted is when running single-user, so a message saying /usr/bin is
   missing wouldn't be a bad idea.

-- 
Karl Vogel                      I don't speak for the USAF or my company

The danger is not that one class is unfit to govern.
All classes are unfit to govern.                        --Lord Acton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090411003758.D80D0BE71>