Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 2015 21:34:47 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r379119 - head/Keywords
Message-ID:  <201502162134.t1GLYl0t060682@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj (src committer)
Date: Mon Feb 16 21:34:46 2015
New Revision: 379119
URL: https://svnweb.freebsd.org/changeset/ports/379119
QAT: https://qat.redports.org/buildarchive/r379119/

Log:
  When updating /etc/shells, only remove existing entries that match the new
  entry exactly. Otherwise we may clobber entries that contain the new entry
  as a substring.
  
  Reviewed by:	bdrewery
  Approved by:	bdrewery
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/Keywords/shell.ucl

Modified: head/Keywords/shell.ucl
==============================================================================
--- head/Keywords/shell.ucl	Mon Feb 16 21:28:10 2015	(r379118)
+++ head/Keywords/shell.ucl	Mon Feb 16 21:34:46 2015	(r379119)
@@ -18,7 +18,7 @@ post-install: <<EOD
   *) file="%D/%@" ;;
   esac
         cp /etc/shells /etc/shells.bak
-        (grep -v ${file} /etc/shells.bak; echo ${file}) > /etc/shells
+        (grep -v "^${file}$" /etc/shells.bak; echo ${file}) > /etc/shells
         rm -f /etc/shells.bak
 EOD
 pre-deinstall: <<EOD
@@ -27,6 +27,6 @@ pre-deinstall: <<EOD
   *) file="%D/%@" ;;
   esac
         cp /etc/shells /etc/shells.bak
-        grep -v ${file} /etc/shells.bak > /etc/shells
+        grep -v "^${file}$" /etc/shells.bak > /etc/shells
         rm -f /etc/shells.bak
 EOD



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