OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   16-Nov-2004 19:39:33
  Branch: HEAD                             Handle: 2004111618393200

  Modified files:
    openpkg-src/ntp         rc.ntp

  Log:
    Unfortunately there are three problems: the "^t" escape for a tab
    character in a sed(1) regex is not sufficiently portable, the
    backslashes in the sed(1) command would have to be escaped against the
    surrounding double-quotes and the capturing regex also would capture
    trailing whitespaces. I see no portable and at the same time generic
    enough way to solve this with sed(1). Instead awk(1) works far more
    reasonable here.

  Summary:
    Revision    Changes     Path
    1.30        +1  -1      openpkg-src/ntp/rc.ntp
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/ntp/rc.ntp
  ============================================================================
  $ cvs diff -u -r1.29 -r1.30 rc.ntp
  --- openpkg-src/ntp/rc.ntp    16 Nov 2004 17:25:35 -0000      1.29
  +++ openpkg-src/ntp/rc.ntp    16 Nov 2004 18:39:32 -0000      1.30
  @@ -13,7 +13,7 @@
       ntp_log_complevel="9"
   
   %common
  -    ntp_pidfile=`grep "^pidfile" @l_prefix@/etc/ntp/ntp.conf | sed -e "s;[^ 
^t]*[ ^t]*\(.*\)$;\1;"`
  +    ntp_pidfile=`grep "^pidfile" @l_prefix@/etc/ntp/ntp.conf | awk '{ 
printf("%s", $2); }'`
       ntp_signal () {
           [ -f $ntp_pidfile ] && kill -$1 `cat $ntp_pidfile`
       }
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to