diff options
author | markj <markj@FreeBSD.org> | 2015-02-17 05:34:46 +0800 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-02-17 05:34:46 +0800 |
commit | f2bbb04ef460165fe9bb1683e83a395446c1ef47 (patch) | |
tree | 930146dd260aa273b5c8e1dba84d618f75f07c48 /Keywords/shell.ucl | |
parent | cdda167fb9b263badf9c864e4aef701750487bb5 (diff) | |
download | freebsd-ports-gnome-f2bbb04ef460165fe9bb1683e83a395446c1ef47.tar.gz freebsd-ports-gnome-f2bbb04ef460165fe9bb1683e83a395446c1ef47.tar.zst freebsd-ports-gnome-f2bbb04ef460165fe9bb1683e83a395446c1ef47.zip |
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
Diffstat (limited to 'Keywords/shell.ucl')
-rw-r--r-- | Keywords/shell.ucl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Keywords/shell.ucl b/Keywords/shell.ucl index 16a094eaca95..7c3ae7f1678a 100644 --- a/Keywords/shell.ucl +++ b/Keywords/shell.ucl @@ -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 |