summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2018-01-19 10:59:56 +0800
committerAlejandro del Castillo <alejandro.delcastillo@ni.com>2018-01-21 05:52:31 -0600
commitf2e63deda2eab4dbb7c4cef962e72202b747364a (patch)
tree571bbe42094872c2d0660b6995fa41f4b50d3c89
parent13f6281d24e17199e0fef6c2984419372ea0f86f (diff)
downloadopkg-utils-f2e63deda2eab4dbb7c4cef962e72202b747364a.tar.gz
opkg-utils-f2e63deda2eab4dbb7c4cef962e72202b747364a.tar.bz2
opkg-utils-f2e63deda2eab4dbb7c4cef962e72202b747364a.zip
update-alternatives: fix the sed pattern in remove_alt
'\>' is to matches the end of a word, but the executable is not always a 'word', e.g. /usr/lib64/busybox/usr/bin/[ then such alternatives can not be removed. So change to use '\s' in the pattern since the following character of the $path is whitespace. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-rw-r--r--update-alternatives2
1 files changed, 1 insertions, 1 deletions
diff --git a/update-alternatives b/update-alternatives
index ffad853..ce7d66c 100644
--- a/update-alternatives
+++ b/update-alternatives
@@ -80,7 +80,7 @@ remove_alt() {
[ ! -f $ad/$name ] && return 0
path=`echo $path | protect_slashes | protect_special_character`
- sed -ne "/^$path\>.*/!p" $ad/$name > $ad/$name.new
+ sed -ne "/^$path\s.*/!p" $ad/$name > $ad/$name.new
mv $ad/$name.new $ad/$name
}