aboutsummaryrefslogtreecommitdiff
path: root/Keywords
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2015-02-16 21:34:46 +0000
committerMark Johnston <markj@FreeBSD.org>2015-02-16 21:34:46 +0000
commit0cebfcf22e09eafca749cca8caa5e963740b3e77 (patch)
tree930146dd260aa273b5c8e1dba84d618f75f07c48 /Keywords
parent930c2ef952dd3026fd049248bd81293582d2533b (diff)
downloadports-0cebfcf22e09eafca749cca8caa5e963740b3e77.tar.gz
ports-0cebfcf22e09eafca749cca8caa5e963740b3e77.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
Notes
Notes: svn path=/head/; revision=379119
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/shell.ucl4
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